pragmagic / vscode-nim

An extension for VS Code which provides support for the Nim language.
Other
237 stars 37 forks source link

Ability to specify nimsuggest flags/parameters #43

Open eliezedeck opened 7 years ago

eliezedeck commented 7 years ago

I have the following workspace configuration:

// Place your settings in this file to overwrite default and user settings.
{
  "nim.buildCommand": "--path:'/Users/elie/Projects/libs' c --debugger:native"
}

I'd like to be able to specify the same for nimsuggest so that it will be able to see my libraries in VSCode instead of printing errors all of the place.

endragor commented 7 years ago

You should use nim.cfg or config.nims files to specify those. nimsuggest will pick them up, as well as Nim. You can find more info about config files here: https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files

nim.buildCommand setting is intended only for specifying build command (c, cpp, objc, etc.).

eliezedeck commented 7 years ago

Thanks for that. I never rarely used nim.cfg. Now I see some good use to it.

Some other strange thing I notice, is that the original completion by VSCode are missing when using the plugin.

I know the ideal would be that the plugin would complement the word completion built-in in VSCode, but if not, how can I at least have the word completions working along side, or switch to that if need be.