diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..1e1765c --- /dev/null +++ b/.luarc.json @@ -0,0 +1,5 @@ +{ + "diagnostics.globals": [ + "vim" + ] +} \ No newline at end of file diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..1e1765c --- /dev/null +++ b/.luarc.json @@ -0,0 +1,5 @@ +{ + "diagnostics.globals": [ + "vim" + ] +} \ No newline at end of file diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua new file mode 100644 index 0000000..b2866d5 --- /dev/null +++ b/lua/plugins/lsp-config.lua @@ -0,0 +1,38 @@ +return { + { + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end, + }, + { + "williamboman/mason-lspconfig.nvim", + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { + "bashls", -- bash + "jsonls", -- json + "lua_ls", -- lua + "lemminx", -- xml + "yamlls", -- yaml + } + }) + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + local lspconfig = require("lspconfig") + + lspconfig.bashls.setup({}) + lspconfig.jsonls.setup({}) + lspconfig.lua_ls.setup({}) + lspconfig.lemminx.setup({}) + lspconfig.yamlls.setup({}) + + vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) + vim.keymap.set({ 'n' }, 'ca', vim.lsp.buf.code_action, {}) + end, + } +} diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..1e1765c --- /dev/null +++ b/.luarc.json @@ -0,0 +1,5 @@ +{ + "diagnostics.globals": [ + "vim" + ] +} \ No newline at end of file diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua new file mode 100644 index 0000000..b2866d5 --- /dev/null +++ b/lua/plugins/lsp-config.lua @@ -0,0 +1,38 @@ +return { + { + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end, + }, + { + "williamboman/mason-lspconfig.nvim", + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { + "bashls", -- bash + "jsonls", -- json + "lua_ls", -- lua + "lemminx", -- xml + "yamlls", -- yaml + } + }) + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + local lspconfig = require("lspconfig") + + lspconfig.bashls.setup({}) + lspconfig.jsonls.setup({}) + lspconfig.lua_ls.setup({}) + lspconfig.lemminx.setup({}) + lspconfig.yamlls.setup({}) + + vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) + vim.keymap.set({ 'n' }, 'ca', vim.lsp.buf.code_action, {}) + end, + } +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 6b30584..9a10d31 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,9 +1,25 @@ return { - 'nvim-telescope/telescope.nvim', tag = '0.1.5', - dependencies = { 'nvim-lua/plenary.nvim' }, - config = function() - local builtin = require("telescope.builtin") - vim.keymap.set('n', '', builtin.find_files, {}) - vim.keymap.set('n', 'fg', builtin.live_grep, {}) - end, + { + 'nvim-telescope/telescope.nvim', tag = '0.1.5', + dependencies = { 'nvim-lua/plenary.nvim' }, + config = function() + local builtin = require("telescope.builtin") + vim.keymap.set('n', '', builtin.find_files, {}) + vim.keymap.set('n', 'fg', builtin.live_grep, {}) + end, + }, + { + "nvim-telescope/telescope-ui-select.nvim", + config = function() + require("telescope").setup({ + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown { + } + } + } + }) + require("telescope").load_extension("ui-select") + end, + } }