4 ms·
In my experience, the built in LSP is a mixed bag. Getting language servers configured is a breeze, diagnostics and go-to definition work just fine. But trying
by jpe90 5y ago
In my experience, the built in LSP is a mixed bag. Getting language servers configured is a breeze, diagnostics and go-to definition work just fine. But trying to get autocomplete and snippets to work is an exercise in frustration. There's a handful of different hobbyist implementations which are all somewhat-maintained and somewhat work together but it's buggy and you end up needing to do 20x the effort of using VS code to get not quite the same ease of use.
I really hope they'll do some official work on lua-based solutions for autocomplete and code snippets in the future to really round out the LSP support, if that's something that they want to highlight as a feature of neovim. I still think VS code is the way to go if you want LSP features, but 0.5 is a terrific step forward and everyone who worked on it should be very proud.
- davidkunz 5y agoI have zero problems with nvim-compe [1], it works like a breeze. [1]: https://github.com/hrsh7th/nvim-compe https://github.com/hrsh7th/nvim-compe
- jpe90 5y agoI didn't have issues with compe until I started using snippets, at which point I needed to manually modify the lua code that they provide for you (to own and maintain yourself) for tab completion. I had to spend a fair amount of time getting the right compe - snippet provider setup that would populate correctly. Once I added snippets and modified the completion code, the ability to hit "Enter" to select an autocompletion selection broke and I couldn't manage to fix it without preventing the key from entering a newline in insert mode. I ended up just remapping it to a new key. But even then, it's still a little quirky- if I type some text and hit tab expecting to add some spacing, I'd instead get prompted for autocomplete suggestions I wasn't looking for. I get that all this is fun for some people, but I just want sane defaults that work like VS code.
- YuukiRey 5y agoLast I used it it was often missing completion candidates https://github.com/hrsh7th/nvim-compe/issues/248 https://github.com/hrsh7th/nvim-compe/issues/248 which was extremely frustrating but apparently hard to fix
- natrys 5y agoI have a question. Once you hit the tab and get a list of completion items through either completion-nvim or nvim-compe, how do you further narrow down the list? All I can do is cycle through items or match by prefix, but I want further narrowing by matching substring/regex/flex anywhere in the items à la Ivy/Helm from Emacs (or any of the so many completion systems available in Emacs).
- qbasic_forever 5y agoYeah coc.nvim is a much better experience in my usage. I want to love the native LSP, but the hodgepodge of in-progress or abandoned completion, suggestion, signature, diagnostic, etc. UI is a big pain point right now. For example I have to install 3 different plugins to get all the LSP UI so it means I have 3 different opinions on how various parts of its UI should look and it's a real mess--the popups for suggestions as I type are totally different looking compared to the popups to show function signatures (and each has their own bespoke way of being configured).
- jpe90 5y agoThis has been my experience as well. Coc.nvim was far smoother sailing.
- ibraheemdev 5y agoHm, mine worked out of the box with `nvim-lspconfig` and `completion-nvim`. What 3 different plugins are you referring to?
- mjlbach 5y agoHi, neovim core member here. Which UI plugins do you need? We've done a lot of work leading up to 0.5 in improving the built-in handlers, so you shouldn't need a UI plugin. I think the main plugins people install (in addition to lspconfig): * nvim-compe (autocompletion) * vim-vsnip (snippets) * lsp_signature.nvim (automatically pop up signature window, note signature_help is built-into core, just manually triggered) Some people use lspsaga.nvim, but borders are already merged into the core handlers (and our floating windows now provide better markdown styling than lspsaga), so the main utility of lspsaga is in the different way of interacting with code actions, which I personally do not prefer. Anyways, please open an issue or PR if you have concrete suggestions (or start a discussion on our discourse)! I'm personally very invested in improving the UX around the built-in language server client, and it has really improved leading up to the 0.5 release.
- qbasic_forever 5y agoI tried nvim-compe, but it explicitly doesn't support signatures (see https://github.com/hrsh7th/nvim-compe#does-not-work-function-signature-window https://github.com/hrsh7th/nvim-compe#does-not-work-function... ). So I installed the recommended lsp_signature.nvim and it's a bit of a mess. The UI for lsp_signature has enormous borders and doesn't match at all with the rest of compe. Perhaps there are ways to tweak lsp_signature UI... but at this point, I chucked it all and went back to coc.nvim which does it all (suggestions, signatures, etc.) all with the same UI. Make it like that--make it work with all UI out of the box and not make me dig through tons of plugins. That's my honest suggestion. Sorry I'm not joining a discord, etc. to give this feedback.
- sxiao 5y agoAgreed. It took me half a day and I came not remotely to the UX and performance of coc.vim. Most incl. the nvim team are not aware that eg. tsserver is the fastest and most responsive code formatter for TS (yes, it goes beyond the LSP spec but that's how it is, also for historical reasons). Prettier does not come close. Maybe they've never tried or deliberately ignore coc.vim for whatever reason. coc.vim works almost out of the box, has the fastest and most pragmatic maintainer who helps anyone and tsserver makes it as good and as fast as VS Code. Instead of just cloning coc.vim's tsserver implementation—or why do they no contribute to coc.vim??—roll their own inferior solution, years later. It's not that nvim's LSP implementation is at its beginning and we can expect more is coming, no the maintainers just do not know or ignore the status quo. Feels very much like Bram a decade ago. Maybe it's time that we see a third fork—coc.vim.
- mjlbach 5y agoHi, I'm a maintainer. I think this is a huge mischaracterization of the team. We definitely are aware (and inform users) the current state using the theia wrapper lags coc.nvim and vscode. We've never said anything disparaging about coc.nvim, and the built-in client is still seeing rapid development. We provide a client, not language servers, so we're kinda at the mercy of whatever language servers exist. We offer a configuration in lspconfig for https://github.com/theia-ide/typescript-language-server https://github.com/theia-ide/typescript-language-server which wraps tsserver, but there is hope that microsoft could implement lsp protocol directly for tsserver https://github.com/microsoft/TypeScript/issues/39459#issuecomment-775316357 https://github.com/microsoft/TypeScript/issues/39459#issueco... at which point the experience should be more comparable to coc.nvim. On a different note, we have made upstream requests to MS, worked with language server authors, and generally try to contribute positively to the language server ecosystem. Neovim users will always be free to use coc. If you have actionable items for improving the client, please reach out on our discourse or on our matrix channel. Thanks!