seantronsen / neovim-config

0 stars 0 forks source link

LSP Ignore Keybinding #13

Closed seantrons closed 1 month ago

seantrons commented 1 year ago

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.

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.

seantrons commented 1 month ago

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.