mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-06-30 20:40:42 +00:00
Add suport for nvim's LSP
This commit is contained in:
parent
4eee9b4398
commit
46ca9189af
6 changed files with 180 additions and 11 deletions
31
home/.config/nvim/lua/lsp/init.lua
Normal file
31
home/.config/nvim/lua/lsp/init.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
-- Neovim has built in support for the language server protocol (LSP). For
|
||||
-- which reason I decided to utilize it directly instead of relying on plugins
|
||||
-- such as COC, which reimplement it completely just to support default vim
|
||||
-- too, since I don't need pure vim support, utilizing this built in support
|
||||
-- makes a lot more sense and will be faster.
|
||||
--
|
||||
-- By default, setting up LSP doesn't technically require any plugins, however
|
||||
-- I still do use the recommended neovim/nvim-lspconfig plugin, along with
|
||||
-- williamboman/nvim-lsp-installer, because it makes things a lot easier to get
|
||||
-- working. The lspconfig holds the default configurations for the individual
|
||||
-- language servers, avoiding the need of tediously configuring them manually,
|
||||
-- and the lspinstaller gives us a way to automatically install selected
|
||||
-- language servers locally for nvim only, which means we won't need to look at
|
||||
-- the install instructions for each language server and install it user or
|
||||
-- system wide.
|
||||
--
|
||||
-- However, since this configuration shouldn't be plugin dependant, as it is
|
||||
-- outside of the plugins/ directory and LSP is supported by neovim directly,
|
||||
-- this folder is here to provide the non-plugin dependant LSP configuration,
|
||||
-- but I do not manually define the configuration for each language server,
|
||||
-- since I do actually utilize those plugins, but sturcturing like this still
|
||||
-- does give space for completely custom configurations written from scratch
|
||||
-- without relying on any external plugins at all. If you do want to do that,
|
||||
-- this would be the place to set this up.
|
||||
--
|
||||
-- NOTE: With my current configuration, this file is only ran by being required
|
||||
-- in the lsp plugin config file, if you don't wish to run with plugins, you'll
|
||||
-- want to require this file from init.lua directly.
|
||||
|
||||
require("lsp.keymaps")
|
||||
require("lsp.autoformat")
|
Loading…
Add table
Add a link
Reference in a new issue