summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--lua/plugins/mason.lua24
2 files changed, 25 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e033bc6..a0a3832 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
lazy-lock.json
+.luarc.json
diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua
new file mode 100644
index 0000000..f600a1a
--- /dev/null
+++ b/lua/plugins/mason.lua
@@ -0,0 +1,24 @@
+return {
+ {
+ "williamboman/mason.nvim",
+ config = true
+ },
+ {
+ "williamboman/mason-lspconfig.nvim",
+ config = true,
+ opts = {
+ ensure_installed = { "lua_ls" }
+ }
+ },
+ {
+ "neovim/nvim-lspconfig",
+ config = function()
+ local lspconfig = require("lspconfig")
+ lspconfig.lua_ls.setup({})
+
+ vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
+ vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {})
+ vim.keymap.set({'n','v'}, '<leader>ca', vim.lsp.buf.code_action, {})
+ end,
+ },
+}