-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
diagnosticls and eslint #2
Comments
My version is kinda hacky in that it runs This is where I got the code from initially: https://www.reddit.com/r/neovim/comments/j2tn38/help_with_integrate_nvimlsp_with_eslint/g79ekv5/ |
Also to note, I sort of dropped it in, to allow me to try it without ALE. There is a bit of polish I would do even initially (tsserver and eslint duplicate simular rules, maybe disabling hints from typescript-language-server) But this way I can go through diagnostics all in the same interface, get virtual text and so on. |
I'll try your suggestion, thanks. I like it is close to being optimal, but it still feels like a uphill battle to get it running as smoothly as VSCode runs TS with ESLint and Prettier. I've had a pretty good CoC setup for a long time but it just slows my machine down so much. I'll get there eventually. I just thought that this new PR with multiple LSP's was the missing pieces! It seems you just need to disable hints (errors) from TS LSP, I guess you want those errors/warnings from ESLint based of your project config. It could vary. |
I would say you can directly blame VSCode/Typescript being the same vendor. We must push against this force though so we can get the support we want. There are various implementation with people not wanting to maintian their typescript language servers. So its more rough because the main vendor has built most of the typescript language server directly into VSCode. CoC has a lot of the same limitations of the typescript LS but it integrates linter/formatting support (i'm sort of guessing, never actually used CoC). IIRC there may be a proper typescript language server by Microsoft in the future. I'd imagine it would come with yarn/package.json support to detect if you have eslintrc or prettierrc and automatically run it those as well. So for now I'm just going to try and get diagnosticls to work well with the gaps missing and not try to overlap. |
See microsoft/TypeScript#39459 for info about the Microsoft TS LS |
I just tried to spend some more time with it. I am obviously making some kind of mistake, because no matter what I do eslint warnings or errors are not showing. In my head I would love them to show inline like the default lsp errors, but not sure what I need to change, i feel i have similar setup as you do. Do you wanna take a quick look? I admit I am not the best at the config setup.
This sucks, will take a while to get us up to speed, but I agree we must truck on. I did try VSCode with Vim extension but while I love the integration with TS (and Rust, which is the two languages i use professionally) I can't leave my "native" (N)vim. |
I'm going to take a look a little later tonight. I had it working but now its not working so I'm going to figure out all the eslint/prettier things. |
Ok I currently have diagnosticls linting and formatting, and tsserver also doing it's things. The issue was the https://github.com/rockerBOO/dotfiles/blob/master/config/nvim/lua/lsp_config.lua Its mostly the same. I added an on attach hook for doing the formatting. https://www.reddit.com/r/neovim/comments/jvisg5/lets_talk_formatting_again/ gave the example I am using. |
This is great nice. I just got it to work as well. Thanks for posting this to me as well. |
For others following along, I have moved to using |
any reasoning why? is it more performing? I also have a question, why dont we have an lsp manager plugin to handle all these custom configurations? i dont have the skillls to do this but I was wondering why no one hasnt thought about this before |
Honestly I was just lazy and efm had a configuration already written on their README. Not sure of the absolute differences (speed, size, updating, toolchain) but it worked more for me. LSP is pretty new, especially for neovim (isn't even released yet) so "feature-full" plugins will come a little later. Likely packages that will automatically setup specific environments (like typescript + eslint + prettier) will come more in the future. Other languages like rust/go have an inclusive toolchain that everyone uses (rust-analyzer, rustfmt, clippy) (go fmt, go vet) so these are a little easier to have all working with 1 LS. With the release of neovim 0.5 it will be more likely to have things more mature, without all the growing pains of missing utility. I have a list of the newer neovim plugins for LSP which is growing as the LSP client implementation is getting ready for release. |
i *might* have jumped to soon on the bandwagon because now every time i
open a file on my vimrc i get an error i never saw before:
Error detected whiile processing function<SNR>28_UseConfigFiles:
line 40:
E714: list required
But yes I understand now the dificulty of this. It also doesnt help that
microsoft being all friendly open source kindly neglets actually
implementing the LSP part of the language they created ...
…On Mon, Apr 12, 2021 at 3:20 PM Dave Lage ***@***.***> wrote:
Honestly I was just lazy and efm had a configuration already written on
their README. Not sure of the absolute differences (speed, size, updating,
toolchain) but it worked more for me.
LSP is pretty new, especially for neovim (isn't even released yet) so
"feature-full" plugins will come a little later. Likely packages that will
automatically setup specific environments (like typescript + eslint +
prettier) will come more in the future. Other languages like rust/go have
an inclusive toolchain that everyone uses (rust-analyzer, rustfmt, clippy)
(go fmt, go vet) so these are a little easier to have all working with 1 LS.
With the release of neovim 0.5 it will be more likely to have things more
mature, without all the growing pains of missing utility. I have a list
of the newer neovim plugins for LSP
<https://github.com/rockerBOO/awesome-neovim#lsp> which is growing as the
LSP client implementation is getting ready for release.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD7WGR5OYYDINTJLCKXZGD3TIL6SJANCNFSM4TW65XIA>
.
|
Aparently its from editorconfig-vim. Had to uninstall it
…On Mon, Apr 12, 2021 at 3:22 PM David Maia ***@***.***> wrote:
i *might* have jumped to soon on the bandwagon because now every time i
open a file on my vimrc i get an error i never saw before:
Error detected whiile processing function<SNR>28_UseConfigFiles:
line 40:
E714: list required
But yes I understand now the dificulty of this. It also doesnt help that
microsoft being all friendly open source kindly neglets actually
implementing the LSP part of the language they created ...
On Mon, Apr 12, 2021 at 3:20 PM Dave Lage ***@***.***>
wrote:
> Honestly I was just lazy and efm had a configuration already written on
> their README. Not sure of the absolute differences (speed, size, updating,
> toolchain) but it worked more for me.
>
> LSP is pretty new, especially for neovim (isn't even released yet) so
> "feature-full" plugins will come a little later. Likely packages that will
> automatically setup specific environments (like typescript + eslint +
> prettier) will come more in the future. Other languages like rust/go have
> an inclusive toolchain that everyone uses (rust-analyzer, rustfmt, clippy)
> (go fmt, go vet) so these are a little easier to have all working with 1 LS.
>
> With the release of neovim 0.5 it will be more likely to have things more
> mature, without all the growing pains of missing utility. I have a list
> of the newer neovim plugins for LSP
> <https://github.com/rockerBOO/awesome-neovim#lsp> which is growing as
> the LSP client implementation is getting ready for release.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#2 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AD7WGR5OYYDINTJLCKXZGD3TIL6SJANCNFSM4TW65XIA>
> .
>
|
Hi Rockerboo.
I've been following your dotfiles since you are using prettier, eslint and TS with nvim-lsp, something I've recently tried to migrate to (from coc). I have been following neovim/neovim#12655 to have multiple LSP running. I tried to copy your setup. This is what i currently have: lsp/init.lua.
My problem is that eslint is not showing up. TS LSP is running and working but unsure what I need to do in order for eslint to work. Do you have any suggestions?
If you don't want these questions then I respect if you close this issue.
The text was updated successfully, but these errors were encountered: