Dotfiles/.config/nvim/lua/plugins/lspconfig.lua

16 lines
669 B
Lua
Raw Permalink Normal View History

2024-08-14 12:31:08 +00:00
local util = require "lspconfig/util"
2024-03-04 14:36:33 +00:00
return {
"neovim/nvim-lspconfig",
config = function()
2024-08-14 12:31:08 +00:00
require("lspconfig").ruby_lsp.setup({})
2024-03-16 11:36:09 +00:00
vim.keymap.set('n', '<leader>ld', function() vim.lsp.buf.definition() end, bufopts)
2024-03-04 14:36:33 +00:00
vim.keymap.set('n', '<leader>la', function() vim.lsp.buf.code_action() end, bufopts)
vim.keymap.set('n', '<leader>lK', vim.lsp.buf.signature_help, {})
vim.keymap.set('n', '<leader>lq', vim.diagnostic.setloclist, {})
vim.keymap.set('n', 'E', vim.diagnostic.open_float, {})
vim.keymap.set('n', 'H', function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("n", "<leader>lf", vim.lsp.buf.format) -- Format code
end
}