News for hackers. Stuff that matters.
Re:Why LSP? by junon on Monday April 25, 2022 @03:17AM (#31151450)
I recently switched my neovim config over to LSP from ncm. My experience is now much buggier, slower, features work some days and not others, syntax highlighting just stops working randomly, trash files get spewn all over my repositories that I have to .git/info/exclude, etc.

Not sure what the Right Direction is when it comes to text editing but this isn't it.

Re:Why LSP? by lf-non on Monday April 25, 2022 @04:46AM (#31151954)
I have been using neovim native lsp for a couple months for TS, JS & Go and overall have been very happy with how well it works.

The issue is trash files is very weird and I doubt it has to do with lsp integration.

Maybe tryout AstroNvim [1] which is a nice pre-integrated environment with a lot of sane defaults.

[1] https://github.com/AstroNvim/AstroNvim

Re:Why LSP? by junon on Tuesday April 26, 2022 @06:27AM (#31165725)
The LSP daemons themselves have trash files, namely clangd.
Re:Why LSP? by davidatbu on Monday April 25, 2022 @04:06AM (#31151718)
Assuming you're talking about this ncm[0], are you aware that ncm is a " completion framework for neovim", which is different from an LSP? ncm is either an LSP client itself, or, it is talking to neovim's internal LSP client, to get completions from LSPs.

It's also important to note that LSPs almost always provide you more than auto completion (for example, go to definition, go to implementation, find references).

Do let me know if you have more questions, neovim and LSPs are my "daily driver" as a dev, so to speak.

[0] https://github.com/ncm2/ncm2

Re:Why LSP? by junon on Tuesday April 26, 2022 @06:32AM (#31165758)
Yep I'm aware of what it is, I used it for years and years, thanks.

NCM ancillary plugins that interacted with e.g. libclang were more what I was referring to, but I'd hoped the average reader could deduce that.

Those features of LSP I do not use, namely because LSP is a buggy mess. Some files have wild syntax errors reported for them that don't exist when compiling, but not others. Half the time, the auto-completion simply doesn't do anything. Nothing pops up, nothing auto-completes, etc.

And now, just a few weeks after switching over, without changing a thing about my config, the arrow keys for selection have completely stopped working inexplicably.

Re:Why LSP? by davidatbu on Tuesday April 26, 2022 @09:29AM (#31167219)
So, synthesizing your reply here with your reply to @mjlbach, it seems to me like you are attributing to the whole LSP ecosystem (by saying things like "LSP is a buggy mess") (1) problems with treesitter, and (2) problems with clangd, one LSP server implementation.

I feel like if your comments' utility to the conversation would be greatly improved by prefacing them with something like "in my experience with clangd, treesitter and neovim".

I say this because my experience with LSPs is the polar opposite of yours[0]. While I believe there's value to sharing our personal experiences, I think we have to be careful not to present our personal experience (especially with (neo)vim setups, which tend to vary wildly from one to the next) as representative of the whole ecosystem.

[0] I also have nothing but praise for most of the LSPs I've used (clangd, typescript-language-server, rust-analyzer, clangd, pyright, css-language-server, sumneko/lua-language-server, of the top of my head).

Re:Why LSP? by mjlbach on Monday April 25, 2022 @10:35AM (#31155423)
> My experience is now much buggier, slower

You'll have to file a bug report, because none of the built-in LSP stuff should cause any performance degradation.

> syntax highlighting just stops working randomly

This has nothing to do with LSP.

> files get spewn all over my repositories that I have to .git/info/exclude

Neovim does not automatically create files in your repositories.

Re:Why LSP? by junon on Tuesday April 26, 2022 @06:28AM (#31165737)
> You'll have to file a bug report, because none of the built-in LSP stuff should cause any performance degradation.

That's a bold claim. Migrating from NCM + clangd integration is absolutely slower.

> This has nothing to do with LSP.

Sorry, you're right. Tree-sitter-based syntax highlighting is buggy and slow. My point still stands.

> Neovim does not automatically create files in your repositories.

No, you're right. Clangd does. I was commenting more on my experience, less Neovim's LSP behavior specifically.

Re:Why LSP? by mjlbach on Wednesday April 27, 2022 @01:36AM (#31176691)
> That's a bold claim. Migrating from NCM + clangd integration is absolutely slower.

You'll have to define slower (time to diagnostics, time to completion, are you really talking about the performance of nvim-cmp instead, etc.) preferably in a bug report with benchmarks. I've done several rounds of performance optimization since 0.5, and I haven't heard any complaints since 0.6 when I swapped out our json decoder.

Re:Why LSP? by davidatbu on Sunday May 01, 2022 @04:43AM (#31223259)
I would just back up @mjlbach here, and provide my datapoint as a neovim user: I have no complaints with regards to neovim's builtin LSP client, especially with regards speed.