Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User's configuration is not taken into account when getting sdk path #13

Closed
nghialm269 opened this issue Mar 17, 2021 · 4 comments
Closed

Comments

@nghialm269
Copy link
Contributor

Hi,
Thanks for the great plugin.

After this commit b5fcd4b, I wasn't able to set my own flutter_lookup_cmd anymore.

I tried to put vim.notify(vim.inspect(_config)) after this line, and I don't see my configuration in the output.
I also tried vim.notify(vim.inspect(require("flutter-tools/config").get())) there but still not see my configuration.

It seems like the user configuration is lost. I tried to fix it but my lua is not good enough.

My configuration:

require'flutter-tools'.setup{
  experimental = {
    lsp_derive_paths = true,
  },
  flutter_lookup_cmd = "asdf where flutter",
  flutter_outline = {
    highlight = "NonText",
    enabled = true,
  },
  closing_tags = {
    highlight = "Comment",
    prefix = "-- "
  },
  dev_log = {
    open_cmd = "tabedit",
  },
  outline = {
    open_cmd = "30vnew",
  },
  lsp = {
    on_attach = on_attach,
    capabilities = capabilities,
  }
}

(btw there are some typos in the readme: derive_lsp_paths -> lsp_derive_paths, asdf which flutter -> asdf where flutter)

@akinsho
Copy link
Owner

akinsho commented Mar 17, 2021

@nghialm269 thanks for trying out the plugin 👍🏿 and for pointing this out. I pushed a change which should fix it this morning lemme know how that works. Regarding the typos in the README can you make a PR, there's a lot to do and I easily forget things like that

@nghialm269
Copy link
Contributor Author

I pushed a change which should fix it this morning lemme know how that works.

Thanks, the commit fixed the configuration issue for me, I found another issue (not sure if it is due to the commit or due to the previous refactor):

if I do FlutterRun and then FlutterQuit, after that I can't do FlutterRun anymore, I get
image

Regarding the typos in the README can you make a PR, there's a lot to do and I easily forget things like that

I just created a PR for that: #14

@akinsho
Copy link
Owner

akinsho commented Mar 17, 2021

@nghialm269 it could easily be from before or after the refactor I don't think I've actually got that workflow working correctly yet, I need to remove some resources after a user quits which I'm not doing yet. Do you mind raising that as a separate issue I can track and will push a fix when I get a chance. Thanks for testing stuff out btw.

I just created a PR for that: #14
🎉 👍🏿

@akinsho
Copy link
Owner

akinsho commented Mar 17, 2021

@nghialm269 I've raised a separate issue for this in #15 so will close this out now since the latest commit fixed this specific issue

@akinsho akinsho closed this as completed Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants