diff options
| author | yuzu-eva <stevenhu@web.de> | 2022-05-28 02:00:27 +0200 |
|---|---|---|
| committer | yuzu-eva <stevenhu@web.de> | 2022-05-28 02:00:27 +0200 |
| commit | a27de406e272dae5b7389d62018517f1bda3f31b (patch) | |
| tree | ed6997c99e10ac98b34e9352f62558e1981117f5 /.config | |
| parent | 5f95b753445c0d15185e3dc409802ac5d382fb45 (diff) | |
added solargraph to lspconfig
Diffstat (limited to '.config')
| -rw-r--r-- | .config/nvim/lua/user/plugins/lspconfig.lua | 70 | ||||
| -rw-r--r-- | .config/nvim/plugin/packer_compiled.lua | 32 |
2 files changed, 57 insertions, 45 deletions
diff --git a/.config/nvim/lua/user/plugins/lspconfig.lua b/.config/nvim/lua/user/plugins/lspconfig.lua index 2eaa957..3d4c9e3 100644 --- a/.config/nvim/lua/user/plugins/lspconfig.lua +++ b/.config/nvim/lua/user/plugins/lspconfig.lua @@ -8,11 +8,11 @@ vim.diagnostic.config { source = true, focus = false, format = function(diagnostic) - if diagnostic.user_data ~= nil and diagnostic.user_data.lsp.code ~= nil then - return string.format("%s: %s", diagnostic.user_data.lsp.code, diagnostic.message) - end - return diagnostic.message - end, + if diagnostic.user_data ~= nil and diagnostic.user_data.lsp.code ~= nil then + return string.format("%s: %s", diagnostic.user_data.lsp.code, diagnostic.message) + end + return diagnostic.message + end, } } @@ -46,7 +46,7 @@ end -require'lspconfig'.eslint.setup{ +require 'lspconfig'.eslint.setup { on_attach = on_attach, flags = { debounce_text_changes = 150, @@ -56,7 +56,7 @@ require'lspconfig'.eslint.setup{ }, } -require'lspconfig'.tsserver.setup{ +require 'lspconfig'.tsserver.setup { on_attach = on_attach, flags = { debounce_text_changes = 150, @@ -66,33 +66,46 @@ require'lspconfig'.tsserver.setup{ local runtime_path = vim.split(package.path, ';') table.insert(runtime_path, "lua/?.lua") table.insert(runtime_path, "lua/?/init.lua") - -require'lspconfig'.sumneko_lua.setup { +require 'lspconfig'.sumneko_lua.setup { on_attach = on_attach, flags = { debounce_text_changes = 150, }, - cmd = { "/home/cafebabe/repos/lua-language-server/bin/lua-language-server", "-E", "/home/cafebabe/repos/lua-language-server/bin/main.lua"}; + cmd = { "/home/cafebabe/repos/lua-language-server/bin/lua-language-server", "-E", "/home/cafebabe/repos/lua-language-server/bin/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 = runtime_path, - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = {'vim'}, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file("", true), - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, + 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 = runtime_path, + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { 'vim', 'use' }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file("", true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, }, + }, +} + +require 'lspconfig'.solargraph.setup { + on_attach = on_attach, + flags = { + debounce_text_changes = 150, + }, + cmd = { "solargraph", "stdio" }, + filetypes = { "ruby" }, + settings = { + solargraph = { + diagnostics = true, }, }, } @@ -102,10 +115,9 @@ vim.notify = function(msg, log_level, _) if msg:match 'exit code' then return end - if log_level == vim.log.levels.ERROR then + if log_level == vim.log.levels.ERROR then vim.api.nvim_err_writeln(msg) else vim.api.nvim_echo({ { msg } }, true, {}) end end - diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua index f504c93..eddaff8 100644 --- a/.config/nvim/plugin/packer_compiled.lua +++ b/.config/nvim/plugin/packer_compiled.lua @@ -220,18 +220,22 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) --- Config for: lualine.nvim -time([[Config for lualine.nvim]], true) -try_loadstring("\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25user.plugins.lualine\frequire\0", "config", "lualine.nvim") -time([[Config for lualine.nvim]], false) --- Config for: nvim-lspconfig -time([[Config for nvim-lspconfig]], true) -try_loadstring("\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27user.plugins.lspconfig\frequire\0", "config", "nvim-lspconfig") -time([[Config for nvim-lspconfig]], false) -- Config for: nvim-cmp time([[Config for nvim-cmp]], true) try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21user.plugins.cmp\frequire\0", "config", "nvim-cmp") time([[Config for nvim-cmp]], false) +-- Config for: lualine.nvim +time([[Config for lualine.nvim]], true) +try_loadstring("\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25user.plugins.lualine\frequire\0", "config", "lualine.nvim") +time([[Config for lualine.nvim]], false) +-- Config for: nvim-autopairs +time([[Config for nvim-autopairs]], true) +try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs") +time([[Config for nvim-autopairs]], false) +-- Config for: nvim-tree.lua +time([[Config for nvim-tree.lua]], true) +try_loadstring("\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27user.plugins.nvim-tree\frequire\0", "config", "nvim-tree.lua") +time([[Config for nvim-tree.lua]], false) -- Config for: nvim-treesitter time([[Config for nvim-treesitter]], true) try_loadstring("\27LJ\2\n]\0\0\3\0\4\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\0016\0\0\0'\2\3\0B\0\2\1K\0\1\0\28user.plugins.treesitter\nsetup\16spellsitter\frequire\0", "config", "nvim-treesitter") @@ -240,18 +244,14 @@ time([[Config for nvim-treesitter]], false) time([[Config for dracula]], true) try_loadstring("\27LJ\2\n4\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\25user.plugins.dracula\frequire\0", "config", "dracula") time([[Config for dracula]], false) --- Config for: nvim-tree.lua -time([[Config for nvim-tree.lua]], true) -try_loadstring("\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27user.plugins.nvim-tree\frequire\0", "config", "nvim-tree.lua") -time([[Config for nvim-tree.lua]], false) -- Config for: telescope.nvim time([[Config for telescope.nvim]], true) try_loadstring("\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27user.plugins.telescope\frequire\0", "config", "telescope.nvim") time([[Config for telescope.nvim]], false) --- Config for: nvim-autopairs -time([[Config for nvim-autopairs]], true) -try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs") -time([[Config for nvim-autopairs]], false) +-- Config for: nvim-lspconfig +time([[Config for nvim-lspconfig]], true) +try_loadstring("\27LJ\2\n6\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\27user.plugins.lspconfig\frequire\0", "config", "nvim-lspconfig") +time([[Config for nvim-lspconfig]], false) if should_profile then save_profiles() end end) |
