3 ms·
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 highlightin
by junon 5y ago
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.
- davidatbu 5y agoAssuming 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 https://github.com/ncm2/ncm2
- junon 5y agoYep 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.
- davidatbu 5y agoSo, 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).
- lf-non 5y agoI 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 https://github.com/AstroNvim/AstroNvim
- junon 5y agoThe LSP daemons themselves have trash files, namely clangd.
- mjlbach 5y ago> 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.
- junon 5y ago> 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.
- mjlbach 5y ago> 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.
- davidatbu 5y agoI 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.