Let's talk about v4.x #402
Replies: 4 comments 4 replies
-
Since folke/lazy.nvim#338 is now implemented I think it would be beneficial to configure Laziness in this repo so it would be one less thing to do for users. What do you think? |
Beta Was this translation helpful? Give feedback.
-
Hi, Please bear in mind this is from a user perspetive. I have (by necessity) had to use Helix and Zed to edit my yaml files. lsp just works once you download the tools. That said... I believe the future of neovim will/should be one day.... (And can it be v4.x?) opts = { No mason, mason-lspconfig.... Just pair up with mason-tool-installer to get the tools and a one-liner to setup. |
Beta Was this translation helpful? Give feedback.
-
Well thanks so much for this amazing project! As mentioned I am not a programmer, but happens that I have followed lsp since pre neovim 5. I am just super satisfied with my 23 liner lspzero:
And for my own yaml config i have in after/ftplugin/yaml.lua:
I was able to totally remove mason and mason-lspconfig etc. I'm now seeing that its really just extra fluff. I now have my own 'mason-tools-installer.sh' ;) which provides me all the tools for both nvim and hx. (It would be nice though to have the auto_update of the 'real' mason-tools-installer...) And with hx there is really nothing else to do. Just install the tool. It provides lua with inline diagnostics and stuff I have not seen in neovim yet!!! Zero config.
|
Beta Was this translation helpful? Give feedback.
-
I'm really not the expert, but hx feels somewhat uncustomizeable without plugins etc. But in the realm of lzpzero its great! There is no mason installer. So you are on your own to download and/or compile the language servers. But if the binary is in your path there is nothing else to do to have a well functioning lsp+treesitter config. Run hx --health from the command line and you will see what is supported and active as per below. I imagine this is all the stuff from lspconfig built in to helix? So I could imagine for lspzero a plugin where even running setup is optional. Just require lspzero and if you have the lsp binary in your path it works when you open the filetype. And of course you could customize it yourself when necessary. Off topic: Anyway I installed helix as the recent versions of nvim-treesitter will not handle my 44000 line yaml file, so thats what made me try helix and zed as they both use treesitter. Helix is super snappy, and its really really lsp zero. I found this highly motiatiing and it caused me to just remove mason all together from my neovim config. I realize now its very optional. I use lspzero, a custom yaml and xml config and ny neovim now leans on the same binaries as helix for lsp. It made me also think that it would be awesome in the neovim world to have a minimalist mason-installer plugin with no gui type screen. Just a lua ensure_installed script and plugin to make sure stuff gets updated. That along with even the current lspzero would be a winner IMO.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The branch for v4.x has been created. If everyone is ok with it I could make the default in
august
, or is that too soon? The code is already written, I'm just missing the documentation.Let me know what you think about these changes.
New getting started section
In the "getting started" section I'll try my best to tell the reader
nvim-lspconfig
is the plugin they are using to configure the language server.The result from the getting started should be something like this for the LSP configuration.
And the autocompletion setup is just the minimal needed to get nvim-cmp working.
I would love to hide a lot of this nonsense and make it automatic, the problem is users asking for help on other online platforms don't get the help they need. Other Neovim users who can help don't know they can help. If all they see is
lsp_zero.something
, they say "I don't know that plugin. Can't help you." So, you know, I give up on the idea of adding automatic magic. Configuration will be explicit and verbose.Breaking changes
v4.x
will drop the automatic setup of nvim-lspconfigThe user will now have to call
.extend_lspconfig()
function and provide thecmp_nvim_lsp
capabilities settings.v4.x
will drop the automatic setup of nvim-cmpNeovim v0.10 has its own snippet engine, and nvim-cmp tries to use it (if available).
The function
.extend_cmp()
still works and it does the same thing as the example in the getting started section.Deprecated functions were removed
These function were marked as deprecated in
v2.x
. In versionv3.x
they were empty or showed a warning message. Now they are really gone..preset()
.ensure_installed()
.setup_nvim_cmp()
.skip_server_setup()
.nvim_workspace()
.set_preferences()
.defaults.cmp_config()
.defaults.cmp_mappings()
.build_options()
function was removedPeople even use it? I think I just forgot to delete it in
v3.x
.Migrating from v3.x to v4.x
The API is still 99% compatible. Changing from one branch to another should be painless... unless of course one of the deprecated functions is being used. Those are safe to remove even in
v3.x
, they have no effect.On the LSP side users have to opt-in to the features that were previously enabled by default.
.extend_lspconfig()
For autocompletion, users would have to call
.extend_cmp()
or provide the basic options to nvim-cmp's setup.
Beta Was this translation helpful? Give feedback.
All reactions