It would be sweet if we could set a keybinding that executes a function call to append an ignore statement to the end of the current cursor line to disable LSP features for that line.
For example: with PyRight, the # pyright: ignore comment statement disables LSP features and errors for any line it resides on. Similar statements are available for the lua_ls and other LSPs.
The bound function would need to work such that the user could toggle LSP features on a given line.
Issued the binding once, the line is ignored
Issued again, LSP features are reactivated
Although implied implicitly, a map or hash table would be needed achieve this on both a language by language and LSP by LSP basis. The implementation should be convenient to extend and should not mandate one LSP be used for a language over any other.
stale.
also this was fixed a long time ago. it requires setting up custom luasnip snippets. the current pattern for python, as an example, is pyig when in insert mode.
It would be sweet if we could set a keybinding that executes a function call to append an ignore statement to the end of the current cursor line to disable LSP features for that line.
For example: with PyRight, the
# pyright: ignore
comment statement disables LSP features and errors for any line it resides on. Similar statements are available for thelua_ls
and other LSPs.The bound function would need to work such that the user could toggle LSP features on a given line.
Although implied implicitly, a map or hash table would be needed achieve this on both a language by language and LSP by LSP basis. The implementation should be convenient to extend and should not mandate one LSP be used for a language over any other.