You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Hi,
Since the setup annotation defines the use of MasonLspconfigSettings for the config options, the lsp diagnostics complains when passing a table without some fields like the options table from the README example:
Since internally, mason-lspconfig is using vim.tbl_deep_extend between the user options and the defaults inside the settings.set call, the resulting setting.current is indeed a MasonLspconfigSettings type, so there's no need to "force it".
Describe the solution you'd like
It would be a nice touch if the annotations offers some flexibility to avoid those warnings or the usage of ---@diagnostic disable [missing-fields].
Describe potential alternatives you've considered
This could be fixed in a lot of ways. For example this two approaches:
Add a user config type like MasonLspconfigUserSettings:
---@classMasonLspconfigUserSettings---@fieldensure_installed? string[]---@fieldautomatic_installation? boolean---@fieldhandlers? type table<string, fun(server_name: string)>
Is your feature request related to a problem? Please describe.
Hi,
Since the
setup
annotation defines the use ofMasonLspconfigSettings
for the config options, the lsp diagnostics complains when passing a table without some fields like the options table from the README example:Since internally, mason-lspconfig is using
vim.tbl_deep_extend
between the user options and the defaults inside thesettings.set
call, the resultingsetting.current
is indeed aMasonLspconfigSettings
type, so there's no need to "force it".Describe the solution you'd like
It would be a nice touch if the annotations offers some flexibility to avoid those warnings or the usage of
---@diagnostic disable [missing-fields]
.Describe potential alternatives you've considered
This could be fixed in a lot of ways. For example this two approaches:
MasonLspconfigUserSettings
:MasonLspconfigSettings
fields optional:Additional context
If it helps I can work on the PR; I just need to know the selected approach.
Regards
Edit: update the first approach annotations
The text was updated successfully, but these errors were encountered: