diagnostic-languageserver icon indicating copy to clipboard operation
diagnostic-languageserver copied to clipboard

support for "suppress <lint rule>" textDocument/codeAction action

Open MagicDuck opened this issue 3 years ago • 4 comments

Hi there,

I was poking around with this to replace my coc.nvim eslint config, but I noticed that there is no support yet for code action to add stuff like eslint-disable-next-line:

// eslint-disable-next-line import/no-extraneous-dependencies
const glob = require('glob');

This type of code action can be a really handy time saver.

MagicDuck avatar Mar 29 '21 02:03 MagicDuck

@MagicDuck are you getting any code actions though? I found no references to them in the codebase and didn't see anything in my editor when setting up, say, ESLint.

VVKot avatar Apr 04 '21 11:04 VVKot

It's general lint server, so it's hard to add codeActions if there is no common format of the code action from the lint.

iamcco avatar May 07 '21 04:05 iamcco

ended up with slightly hacky solution in my lsp config: see this: https://github.com/neovim/neovim/issues/14258#issuecomment-811515564

MagicDuck avatar May 23 '21 08:05 MagicDuck

If anyone wants this feature, there now exists https://github.com/jose-elias-alvarez/null-ls.nvim which allows you to use the language server API with arbitrary neovim code action etc.

Edit: whoops, wrong issue, keeping here for magicduck

mjlbach avatar May 25 '21 15:05 mjlbach