Browse Source

feat: configure lua LSP for neovim

wayland
David JULIEN 6 months ago
parent
commit
7e3cc716c5
  1. 1
      .config/nvim/init.lua
  2. 3
      .config/nvim/lua/globals.lua
  3. 2
      .config/nvim/lua/lsp/lua.lua
  4. 3
      .gitmodules
  5. 1
      .local/share/nvim/lsp/sumneko_lua

1
.config/nvim/init.lua

@ -15,6 +15,7 @@ require("polyjuice") -- colorscheme
require("lsp") -- ./lua/lsp/init.lua
require("lsp.maps") -- ./lua/lsp/maps.lua
require("lsp.c") -- ./lua/lsp/c.lua
require("lsp.lua") -- ./lua/lsp/lua.lua
require("lsp.python") -- ./lua/lsp/python.lua
-- auto complete

3
.config/nvim/lua/globals.lua

@ -1,4 +1,7 @@
globals = {
lsp_path = vim.fn.stdpath("data").. "/lsp",
-- misc
sign_error = "",
sign_warning = "",
sign_hint = "",

2
.config/nvim/lua/lsp/lua.lua

@ -6,7 +6,7 @@
local system_name = "Linux"
-- set the path to the sumneko installation; if you previously installed via the now deprecated :LspInstall, use
local sumneko_root_path = vim.fn.stdpath('cache')..'/lspconfig/sumneko_lua/lua-language-server'
local sumneko_root_path = globals.lsp_path .. "/sumneko_lua"
local sumneko_binary = sumneko_root_path.."/bin/"..system_name.."/lua-language-server"
require'lspconfig'.sumneko_lua.setup {

3
.gitmodules

@ -16,3 +16,6 @@
[submodule ".local/src/slock"]
path = .local/src/slock
url = git@github.com:swy7ch/slock.git
[submodule ".local/share/nvim/lsp/sumneko_lua"]
path = .local/share/nvim/lsp/sumneko_lua
url = git@github.com:sumneko/lua-language-server.git

1
.local/share/nvim/lsp/sumneko_lua

@ -0,0 +1 @@
Subproject commit 4f1f6d4dbc7940b5f117e25b3528712ff4b221ef
Loading…
Cancel
Save