From 2b6ae8473e1b0fb8cc0bd16aa8c485a77ee5e847 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 16 Mar 2021 21:54:42 +0100 Subject: renaming, treesitter buggy --- .config/nvim/lua/lsp/bash-ls.lua | 2 - .config/nvim/lua/lsp/docker-ls.lua | 2 - .config/nvim/lua/lsp/general.lua | 15 ----- .config/nvim/lua/lsp/init.lua | 19 ------ .config/nvim/lua/lsp/json-ls.lua | 10 --- .config/nvim/lua/lsp/lua-ls.lua | 37 ----------- .config/nvim/lua/lsp/python-ls.lua | 2 - .config/nvim/lua/lsp/vim.lua | 2 - .config/nvim/lua/lsp/wrapper.lua | 129 ------------------------------------- .config/nvim/lua/lsp/yaml-ls.lua | 2 - 10 files changed, 220 deletions(-) delete mode 100644 .config/nvim/lua/lsp/bash-ls.lua delete mode 100644 .config/nvim/lua/lsp/docker-ls.lua delete mode 100644 .config/nvim/lua/lsp/general.lua delete mode 100644 .config/nvim/lua/lsp/init.lua delete mode 100644 .config/nvim/lua/lsp/json-ls.lua delete mode 100644 .config/nvim/lua/lsp/lua-ls.lua delete mode 100644 .config/nvim/lua/lsp/python-ls.lua delete mode 100644 .config/nvim/lua/lsp/vim.lua delete mode 100644 .config/nvim/lua/lsp/wrapper.lua delete mode 100644 .config/nvim/lua/lsp/yaml-ls.lua (limited to '.config/nvim/lua/lsp') diff --git a/.config/nvim/lua/lsp/bash-ls.lua b/.config/nvim/lua/lsp/bash-ls.lua deleted file mode 100644 index 8be0383..0000000 --- a/.config/nvim/lua/lsp/bash-ls.lua +++ /dev/null @@ -1,2 +0,0 @@ --- npm i -g bash-language-server -require'lspconfig'.bashls.setup{} diff --git a/.config/nvim/lua/lsp/docker-ls.lua b/.config/nvim/lua/lsp/docker-ls.lua deleted file mode 100644 index ad6e220..0000000 --- a/.config/nvim/lua/lsp/docker-ls.lua +++ /dev/null @@ -1,2 +0,0 @@ --- npm install -g dockerfile-language-server-nodejs -require'lspconfig'.dockerls.setup{} diff --git a/.config/nvim/lua/lsp/general.lua b/.config/nvim/lua/lsp/general.lua deleted file mode 100644 index fa28dbc..0000000 --- a/.config/nvim/lua/lsp/general.lua +++ /dev/null @@ -1,15 +0,0 @@ -require"lspconfig".efm.setup { - init_options = {documentFormatting = true}, - filetypes = {"lua"}, - settings = { - rootMarkers = {".git/"}, - languages = { - lua = { - { - formatCommand = "lua-format -i --no-keep-simple-function-one-line --no-break-after-operator --column-limit=150 --break-after-table-lb", - formatStdin = true - } - } - } - } -} diff --git a/.config/nvim/lua/lsp/init.lua b/.config/nvim/lua/lsp/init.lua deleted file mode 100644 index 4515e7c..0000000 --- a/.config/nvim/lua/lsp/init.lua +++ /dev/null @@ -1,19 +0,0 @@ ---TODO figure out why this don't work -vim.fn.sign_define("LspDiagnosticsSignError", {texthl = "LspDiagnosticsSignError", text = "", numhl = "LspDiagnosticsSignError"}) -vim.fn.sign_define("LspDiagnosticsSignWarning", {texthl = "LspDiagnosticsSignWarning", text = "", numhl = "LspDiagnosticsSignWarning"}) -vim.fn.sign_define("LspDiagnosticsSignInformation", {texthl = "LspDiagnosticsSignInformation", text = "", numhl = "LspDiagnosticsSignInformation"}) -vim.fn.sign_define("LspDiagnosticsSignHint", {texthl = "LspDiagnosticsSignHint", text = "", numhl = "LspDiagnosticsSignHint"}) - -vim.cmd('nnoremap gd lua vim.lsp.buf.definition()') -vim.cmd('nnoremap gD lua vim.lsp.buf.declaration()') -vim.cmd('nnoremap gr lua vim.lsp.buf.references()') -vim.cmd('nnoremap gi lua vim.lsp.buf.implementation()') -vim.cmd('nnoremap ca :Lspsaga code_action') -vim.cmd('nnoremap K :Lspsaga hover_doc') --- vim.cmd('nnoremap lua vim.lsp.buf.signature_help()') -vim.cmd('nnoremap :Lspsaga diagnostic_jump_prev') -vim.cmd('nnoremap :Lspsaga diagnostic_jump_next') --- scroll down hover doc or scroll in definition preview -vim.cmd('nnoremap lua require(\'lspsaga.action\').smart_scroll_with_saga(1)') --- scroll up hover doc -vim.cmd('nnoremap lua require(\'lspsaga.action\').smart_scroll_with_saga(-1)') diff --git a/.config/nvim/lua/lsp/json-ls.lua b/.config/nvim/lua/lsp/json-ls.lua deleted file mode 100644 index d13fed3..0000000 --- a/.config/nvim/lua/lsp/json-ls.lua +++ /dev/null @@ -1,10 +0,0 @@ --- npm install -g vscode-json-languageserver -require'lspconfig'.jsonls.setup { - commands = { - Format = { - function() - vim.lsp.buf.range_formatting({},{0,0},{vim.fn.line("$"),0}) - end - } - } -} diff --git a/.config/nvim/lua/lsp/lua-ls.lua b/.config/nvim/lua/lsp/lua-ls.lua deleted file mode 100644 index c04219a..0000000 --- a/.config/nvim/lua/lsp/lua-ls.lua +++ /dev/null @@ -1,37 +0,0 @@ --- https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone) -USER = vim.fn.expand('$USER') - -local sumneko_root_path = "" -local sumneko_binary = "" - -if vim.fn.has("mac") == 1 then - sumneko_root_path = "/Users/" .. USER .. "/.config/nvim/lua-language-server" - sumneko_binary = "/Users/" .. USER .. "/.config/nvim/lua-language-server/bin/macOS/lua-language-server" -elseif vim.fn.has("unix") == 1 then - sumneko_root_path = "/home/" .. USER .. "/.config/nvim/lua-language-server" - sumneko_binary = "/home/" .. USER .. "/.config/nvim/lua-language-server/bin/Linux/lua-language-server" -else - print("Unsupported system for sumneko") -end - -require'lspconfig'.sumneko_lua.setup { - cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"}, - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - -- Setup your lua path - path = vim.split(package.path, ';') - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = {'vim'} - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = {[vim.fn.expand('$VIMRUNTIME/lua')] = true, [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true} - } - } - } -} diff --git a/.config/nvim/lua/lsp/python-ls.lua b/.config/nvim/lua/lsp/python-ls.lua deleted file mode 100644 index 11eeef9..0000000 --- a/.config/nvim/lua/lsp/python-ls.lua +++ /dev/null @@ -1,2 +0,0 @@ --- npm i -g pyright -require'lspconfig'.pyright.setup{} diff --git a/.config/nvim/lua/lsp/vim.lua b/.config/nvim/lua/lsp/vim.lua deleted file mode 100644 index a7555c6..0000000 --- a/.config/nvim/lua/lsp/vim.lua +++ /dev/null @@ -1,2 +0,0 @@ --- npm install -g vim-language-server -require'lspconfig'.vimls.setup{} diff --git a/.config/nvim/lua/lsp/wrapper.lua b/.config/nvim/lua/lsp/wrapper.lua deleted file mode 100644 index 7f3647c..0000000 --- a/.config/nvim/lua/lsp/wrapper.lua +++ /dev/null @@ -1,129 +0,0 @@ -local lsp_wrapper = {} - --- buf - -function lsp_wrapper.add_to_workspace_folder() - vim.lsp.buf.add_workspace_folder() -end - -function lsp_wrapper.clear_references() - vim.lsp.buf.clear_references() -end - -function lsp_wrapper.code_action() - vim.lsp.buf.code_action() -end - -function lsp_wrapper.declaration() - vim.lsp.buf.declaration() - vim.lsp.buf.clear_references() -end - -function lsp_wrapper.definition() - vim.lsp.buf.definition() - vim.lsp.buf.clear_references() -end - -function lsp_wrapper.document_highlight() - vim.lsp.buf.document_highlight() -end - -function lsp_wrapper.document_symbol() - vim.lsp.buf.document_symbol() -end - -function lsp_wrapper.formatting() - vim.lsp.buf.formatting() -end - -function lsp_wrapper.formatting_sync() - vim.lsp.buf.formatting_sync() -end - -function lsp_wrapper.hover() - vim.lsp.buf.hover() -end - -function lsp_wrapper.implementation() - vim.lsp.buf.implementation() -end - -function lsp_wrapper.incoming_calls() - vim.lsp.buf.incoming_calls() -end - -function lsp_wrapper.list_workspace_folders() - vim.lsp.buf.list_workspace_folders() -end - -function lsp_wrapper.outgoing_calls() - vim.lsp.buf.outgoing_calls() -end - -function lsp_wrapper.range_code_action() - vim.lsp.buf.range_code_action() -end - -function lsp_wrapper.range_formatting() - vim.lsp.buf.range_formatting() -end - -function lsp_wrapper.references() - vim.lsp.buf.references() - vim.lsp.buf.clear_references() -end - -function lsp_wrapper.remove_workspace_folder() - vim.lsp.buf.remove_workspace_folder() -end - -function lsp_wrapper.rename() - vim.lsp.buf.rename() -end - -function lsp_wrapper.signature_help() - vim.lsp.buf.signature_help() -end - -function lsp_wrapper.type_definition() - vim.lsp.buf.type_definition() -end - -function lsp_wrapper.workspace_symbol() - vim.lsp.buf.workspace_symbol() -end - --- diagnostic - -function lsp_wrapper.get_all() - vim.lsp.diagnostic.get_all() -end - -function lsp_wrapper.get_next() - vim.lsp.diagnostic.get_next() -end - -function lsp_wrapper.get_prev() - vim.lsp.diagnostic.get_prev() -end - -function lsp_wrapper.goto_next() - vim.lsp.diagnostic.goto_next() -end - -function lsp_wrapper.goto_prev() - vim.lsp.diagnostic.goto_prev() -end - -function lsp_wrapper.show_line_diagnostics() - vim.lsp.diagnostic.show_line_diagnostics() -end - --- misc - --- :lua print(vim.inspect(vim.lsp.buf_get_clients())) - --- autoformat --- autocmd BufWritePre *.rs lua vim.lsp.buf.formatting_sync(nil, 1000) - -return lsp_wrapper diff --git a/.config/nvim/lua/lsp/yaml-ls.lua b/.config/nvim/lua/lsp/yaml-ls.lua deleted file mode 100644 index 904f20e..0000000 --- a/.config/nvim/lua/lsp/yaml-ls.lua +++ /dev/null @@ -1,2 +0,0 @@ --- npm install -g yaml-language-server -require'lspconfig'.yamlls.setup{} -- cgit v1.2.3-70-g09d2