1:07:38 Prime is right, these snippet plugins have a lot of snippets that are not useful and only create noise, that's why I removed them from my configuration a few months ago, in my autocomplete I only have what LSP and nvim-async-path. Although you can still configure your own snippets, you just have to create a directory wherever you want and imitate the file structure of the rafamadriz/friendly-snippets repository, configure the package.json, the snippets are just a json file with some properties.
lsp-zero's changes and packer dying were the two best things that happened to my neovim journey after going through 0 to LSP. Learned so much through that process and my config is truly mine.
I'm trying to make the switch to neovim after VSCode's C/C++ extension has literally been crashing the editor from using 15+ GB of memory, the setup videos have been super helpful, definitely stealing some remaps too.
Hey..I am big fan of vim and now neovim. Using it for personal programming and trying to use it on company laptops as well. Recently, I joined a company and they are discouraging using neovim and plugins. The concern of using something like GPT based plugin may be valid but in general the claim is plugins enable some random code executing in vim / neovim. I am not sure how plugin in mechanism works. But can you please throw some light as to security vulnerabilities of plugins if any.
I've just watched 2:15 of setting up neovim; no 2:45 because I found the packer 1 first. And it's taken me longer than that because I was playing along. I'll come back tomorrow for lsp.
I agree, too many people default to grabbing another plugin when it isn't necessary, which is why I have no plugins installed, and just write everything myself in Vimscript.
I tried not using lsp zero and maybe I'm just bad, but I found it so infuriating having my lsp break anytime I opened a new language. I couldn't configure html for the life of me.
mason-lspconfig auto-attaches installed LSPs to supported buffers. `html` LSP works out of the box for me. I think kickstart.nvim default config will handle your needs.
@@gittawat6986 true. But I had to figure out a way to go without it because it took 50ms to initialize lspzero for some reason and was a visible delay on startup. Now it's under 10ms.
Nonsense, a snippet is something that is 100% what you want, copilot is more often than not some bullshit you have to process before accepting, which takes you out of the flow. It's like saying you'd want to replace Lsp's autocomplete by copilot
This is not the main channel tho, he's probably gonna put it up on a repo and make a shorter, objective video with all of this + other things he read and configured off stream
How does this differ from vscode where everything is managed inside the editor? With nvim you just have to manually configure each LSP server using almost the same boilerplate code - it's terrible. Why Mason can't be an external command line tool and why haven't I seen configuration examples where the LSP server automatically starts based on file types or something else (like Helix does, seriously, you don't need to do anything for it, by default it tries to start the server based on directory contents or file types and has built-in config for almost all servers). Even such a basic thing like choosing a formatter is totally complicated.
It's hard to change direction in such a big and "old" project, the neovim team can't just throw away what they were doing for years. If you want that use helix, or write your own Text Editor.
@@levdue6310 nvim-lspconfig is not shipped with NeoVim and it just has no options to automate the attaching of an LSP server, while in Helix you can store language or server specific settings separately and it takes a couple of lines in language.toml file. Writing code like `lspconfig.tsserver.setup()` will also throw an error message when you use your configuration on a machine without tsserver (which actually has a different name, it's just a clumsy alias that you need to find out first) installed. And remember that you need to maintain nvim-cmp for the same servers that you specified in nvim-lspconfig config.
@@dez0rted291 you still have to juggle with nvim-cmp, nvim-lspconfig, mason, mason-lspconfig and call .setup() manually for each server. And also monitor all the breaking changes of lsp-zero.
@@fumanchez I will try to respond to everything you said. You: why Mason can't be an external command line tool? It's a Neovim plugin, it makes sense for it to run inside Neovim. You: why haven't I seen configuration examples where the LSP server automatically starts based on file types or something else? You are definitely speaking without knowing, a language server can be configured to attach to a specific file type, or to a list of file types. Also in Neovim you have another option to start a language server in a project, the option is root_dir, it is a list of files that must exist in the root of the project to start a language server, for example for tsserver nvim-lspconfig configure these: tsconfig.json, package.json, jsconfig.json and the directory .git, and these can be modified. You: Even such a basic thing like choosing a formatter is totally complicated not really, plugins like conform.nvim or formatter.nvim are really easy to use, there is also the builtin vim.lsp.buf.format function that formats using LSP, you can easily create a keymap or a user command to execute that function You: nvim-lspconfig is not shipped with NeoVim of course, because it is a plugin that offers extra functionality that should not be in the core of neovim, also I think you misunderstand the purpose of that plugin, that plugin helps facilitate configuring a language server, but it is not necessary for that, neovim has a built-in LSP client and you can configure a language server without nvim-lspconfig. I suggest you read the article "Neovim journey: using LSP without any plugins!" or another article "Can we manage neovim's LSP client without plugins?", google it, I won't put links here because I think TH-cam eliminates comments with links, although I'm not sure. After reading those articles you will clearly understand how LSP works in Neovim. You: while in Helix you can store language or server specific settings separately and it takes a couple of lines in language.toml file Neovim and Helix have very different approaches, Neovim tries to give the most basic so that the user can build their own configuration on top, on the other hand Helix in my opinion I think it is more about being a kind of mix between Neovim/Vim and VSCode, it is similar to Neovim/Vim because it runs inside the terminal and has almost the same keybindigs and is similar to VSCode in the sense that it does a lot of things for you under the hood and implements some functionalities natively that in Neovim/Vim are found in the form of a plugin. Also VSCode is configured with a JSON, Helix with TOML, very similar, for me personally that is something that does not attract me, I guess I am already very used to Lua, configuring my code editor with JSON or TOML right now for me feels like having my hands tied, I really like the Neovim API and all the functionality it brings. You: Writing code like `lspconfig.tsserver.setup()` will also throw an error message when you use your configuration on a machine without tsserver installed The error you would probably get is that tsserver is not available in your PATH, which is not Neovim's fault, you have to install the language server and you can use mason.nvim for that, and it is also easy to create a command that install all the language servers you want, for example the :MasonInstall command receives as an argument the language server you want to install and you can pass as many as you want and it will install them all, in my configuration I created the :MasonInstallAll command that takes a list of strings with all the language servers I need, it concatenates them separated by a space, basically what it does is run something like MasonInstall gopls tsserver rust-analyzer. You: call .setup() manually for each server You can create a list of strings with the names of the language servers and with a for loop iterate it and run setup for each language server, that is what I do in my configuration since 2021, I have never needed lsp-zero or mason-lspconfig , I only use nvim-lspconfig because it offers me some useful defaults and useful commands and mason.nvim because I can install everything I need without problems with an easy-to-use interface.
Besides lsp, would you like adding some AI stuff? Such as copilot.vim by teep and gen.nvim by david. BTW, will you share the neovim config to your funs? I am looking forward it.
1:07:38 Prime is right, these snippet plugins have a lot of snippets that are not useful and only create noise, that's why I removed them from my configuration a few months ago, in my autocomplete I only have what LSP and nvim-async-path.
Although you can still configure your own snippets, you just have to create a directory wherever you want and imitate the file structure of the rafamadriz/friendly-snippets repository, configure the package.json, the snippets are just a json file with some properties.
@primeagen will share your config on github once you have dailed in the last few things you wanted? - it would be much appreciated!
lsp-zero's changes and packer dying were the two best things that happened to my neovim journey after going through 0 to LSP. Learned so much through that process and my config is truly mine.
so true
My lua_ls won't show any hover documentation after migrating to Lazy, help please!
You can just say `config = true` and it will do `function() require("x").setup { } end` automatically
Also happens when you provide `opts = {}`, lazy.nvim will automatically call `require("your-plugin").setup(opts)`
@@SiddharthPantyeah opts is great
will these updates be pushed to github?
where the dotfiles?
Create your own config
You have to grow the moustache to get the files for free
it's funny watching this now and knowing that blue hair does indeed happen
It's funny to look at Prime twitching without music, it reminds me of this joe rogan episode where they discussed hitler on meth on olymic games
I'm trying to make the switch to neovim after VSCode's C/C++ extension has literally been crashing the editor from using 15+ GB of memory, the setup videos have been super helpful, definitely stealing some remaps too.
Hey..I am big fan of vim and now neovim. Using it for personal programming and trying to use it on company laptops as well. Recently, I joined a company and they are discouraging using neovim and plugins. The concern of using something like GPT based plugin may be valid but in general the claim is plugins enable some random code executing in vim / neovim. I am not sure how plugin in mechanism works. But can you please throw some light as to security vulnerabilities of plugins if any.
I've just watched 2:15 of setting up neovim; no 2:45 because I found the packer 1 first. And it's taken me longer than that because I was playing along. I'll come back tomorrow for lsp.
I agree, too many people default to grabbing another plugin when it isn't necessary, which is why I have no plugins installed, and just write everything myself in Vimscript.
in vimscript? dude why not lua
the diagnostic looks pretty slow, does it because it called after everything initialize?
I tried not using lsp zero and maybe I'm just bad, but I found it so infuriating having my lsp break anytime I opened a new language. I couldn't configure html for the life of me.
mason-lspconfig auto-attaches installed LSPs to supported buffers. `html` LSP works out of the box for me. I think kickstart.nvim default config will handle your needs.
after I watch prime set up everything manually I suddenly understand why something like lsp_zero exists
@@gittawat6986 true. But I had to figure out a way to go without it because it took 50ms to initialize lspzero for some reason and was a visible delay on startup. Now it's under 10ms.
It’s genuinely not hard.
1.) Install LSP on host system
2.) Call lspconfig.lang.setup
3.) And cmp.
But in general is just so infuriating, the setup is so criss cross and complicated
can anyone help me with installing undotree in nvchad?
are his current dotfiles on github?
yes
How do you debug?
With copilot being so good I honestly feel like snippets are simply bloating my autocomplete.
Nonsense, a snippet is something that is 100% what you want, copilot is more often than not some bullshit you have to process before accepting, which takes you out of the flow. It's like saying you'd want to replace Lsp's autocomplete by copilot
Great!!! Still waiting for a 4th part!
anyone know what is his iterm2 colorscheme???
he is on linux so he is not using iterm2. for the colourscheme, I am pretty sure he is using some customised version of rosepine
I am surprised that you didn't use none-ls for diagnostics, formatting and linting. it is null-ls reloaded
thanks primeagen
Did he push this entire config on github ? Sauce peweee !!
min 36: append a comma to the end of some lines C-v3j$A,^]
LEEETS GO
а че делать
дивитись
І вчити державну
@@imaksimus у нас все государственный знают
вивчити нормальну мову
@andrii7879 "нормальна мова" - это английский, остальное не нужно
would've been better to do this off stream and come on a stream and re-do it with all the knowledge and configs ready. this was just way too spastic
Most of the neovim config has been like that 😂
This is not the main channel tho, he's probably gonna put it up on a repo and make a shorter, objective video with all of this + other things he read and configured off stream
@@sutirk probably
I like the process to figure things out. The polished "hey I did it" videos are 99% around
Tell me you don't have a beautiful wife without telling me you don't have a beautiful wife:
"do this off stream..."
Why use a plugin when you're a masochissst
How does this differ from vscode where everything is managed inside the editor? With nvim you just have to manually configure each LSP server using almost the same boilerplate code - it's terrible. Why Mason can't be an external command line tool and why haven't I seen configuration examples where the LSP server automatically starts based on file types or something else (like Helix does, seriously, you don't need to do anything for it, by default it tries to start the server based on directory contents or file types and has built-in config for almost all servers). Even such a basic thing like choosing a formatter is totally complicated.
It's hard to change direction in such a big and "old" project, the neovim team can't just throw away what they were doing for years. If you want that use helix, or write your own Text Editor.
what about lsp-zero?
@@levdue6310 nvim-lspconfig is not shipped with NeoVim and it just has no options to automate the attaching of an LSP server, while in Helix you can store language or server specific settings separately and it takes a couple of lines in language.toml file. Writing code like `lspconfig.tsserver.setup()` will also throw an error message when you use your configuration on a machine without tsserver (which actually has a different name, it's just a clumsy alias that you need to find out first) installed. And remember that you need to maintain nvim-cmp for the same servers that you specified in nvim-lspconfig config.
@@dez0rted291 you still have to juggle with nvim-cmp, nvim-lspconfig, mason, mason-lspconfig and call .setup() manually for each server. And also monitor all the breaking changes of lsp-zero.
@@fumanchez I will try to respond to everything you said.
You: why Mason can't be an external command line tool?
It's a Neovim plugin, it makes sense for it to run inside Neovim.
You: why haven't I seen configuration examples where the LSP server automatically starts based on file types or something else?
You are definitely speaking without knowing, a language server can be configured to attach to a specific file type, or to a list of file types. Also in Neovim you have another option to start a language server in a project, the option is root_dir, it is a list of files that must exist in the root of the project to start a language server, for example for tsserver nvim-lspconfig configure these: tsconfig.json, package.json, jsconfig.json and the directory .git, and these can be modified.
You: Even such a basic thing like choosing a formatter is totally complicated
not really, plugins like conform.nvim or formatter.nvim are really easy to use, there is also the builtin vim.lsp.buf.format function that formats using LSP, you can easily create a keymap or a user command to execute that function
You: nvim-lspconfig is not shipped with NeoVim
of course, because it is a plugin that offers extra functionality that should not be in the core of neovim, also I think you misunderstand the purpose of that plugin, that plugin helps facilitate configuring a language server, but it is not necessary for that, neovim has a built-in LSP client and you can configure a language server without nvim-lspconfig.
I suggest you read the article "Neovim journey: using LSP without any plugins!" or another article "Can we manage neovim's LSP client without plugins?", google it, I won't put links here because I think TH-cam eliminates comments with links, although I'm not sure. After reading those articles you will clearly understand how LSP works in Neovim.
You: while in Helix you can store language or server specific settings separately and it takes a couple of lines in language.toml file
Neovim and Helix have very different approaches, Neovim tries to give the most basic so that the user can build their own configuration on top, on the other hand Helix in my opinion I think it is more about being a kind of mix between Neovim/Vim and VSCode, it is similar to Neovim/Vim because it runs inside the terminal and has almost the same keybindigs and is similar to VSCode in the sense that it does a lot of things for you under the hood and implements some functionalities natively that in Neovim/Vim are found in the form of a plugin.
Also VSCode is configured with a JSON, Helix with TOML, very similar, for me personally that is something that does not attract me, I guess I am already very used to Lua, configuring my code editor with JSON or TOML right now for me feels like having my hands tied, I really like the Neovim API and all the functionality it brings.
You: Writing code like `lspconfig.tsserver.setup()` will also throw an error message when you use your configuration on a machine without tsserver installed
The error you would probably get is that tsserver is not available in your PATH, which is not Neovim's fault, you have to install the language server and you can use mason.nvim for that, and it is also easy to create a command that install all the language servers you want, for example the :MasonInstall command receives as an argument the language server you want to install and you can pass as many as you want and it will install them all, in my configuration I created the :MasonInstallAll command that takes a list of strings with all the language servers I need, it concatenates them separated by a space, basically what it does is run something like MasonInstall gopls tsserver rust-analyzer.
You: call .setup() manually for each server
You can create a list of strings with the names of the language servers and with a for loop iterate it and run setup for each language server, that is what I do in my configuration since 2021, I have never needed lsp-zero or mason-lspconfig , I only use nvim-lspconfig because it offers me some useful defaults and useful commands and mason.nvim because I can install everything I need without problems with an easy-to-use interface.
This is soul crushingly boring. Probably more entertaining live.
Shut up
Do you even vim?
His voice can be annoying from time to time, but we don't have many alternatives.
Besides lsp, would you like adding some AI stuff? Such as copilot.vim by teep and gen.nvim by david. BTW, will you share the neovim config to your funs? I am looking forward it.