aboutsummaryrefslogtreecommitdiff
path: root/config/nvim/lua/plugins/mason.lua
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2022-12-16 23:38:53 +0200
committersrdusr <trevorgray@srdusr.com>2022-12-16 23:38:53 +0200
commit8f4eae2782704484b498129a0a7d9044a4d73fbb (patch)
treee5980ba3f04aa07a32aca2361bfa65b32353684a /config/nvim/lua/plugins/mason.lua
parentdc714e9c0858b309f40f50be3254e42ee2b30b0c (diff)
parent52ed18452c16ed012e646df059859cb7925c1d8d (diff)
downloaddotfiles-8f4eae2782704484b498129a0a7d9044a4d73fbb.tar.gz
dotfiles-8f4eae2782704484b498129a0a7d9044a4d73fbb.zip
Merge commit '240510927f7694d19f8daa67d675d1685c199442' as 'config/nvim'
Diffstat (limited to 'config/nvim/lua/plugins/mason.lua')
-rw-r--r--config/nvim/lua/plugins/mason.lua61
1 files changed, 61 insertions, 0 deletions
diff --git a/config/nvim/lua/plugins/mason.lua b/config/nvim/lua/plugins/mason.lua
new file mode 100644
index 0000000..c0fdca6
--- /dev/null
+++ b/config/nvim/lua/plugins/mason.lua
@@ -0,0 +1,61 @@
+local status, mason = pcall(require, "mason")
+if (not status) then return end
+local status2, lspconfig = pcall(require, "mason-lspconfig")
+if (not status2) then return end
+
+mason.setup({
+
+})
+
+lspconfig.setup {
+ ensure_installed = { "sumneko_lua" },
+}
+local keymap = vim.api.nvim_set_keymap
+local opts = { noremap = true }
+
+
+keymap('n', 'gd', ':lua vim.lsp.buf.definition()<cr>', opts)
+keymap('n', 'gD', ':lua vim.lsp.buf.declaration()<cr>', opts)
+keymap('n', 'gi', ':lua vim.lsp.buf.implementation()<cr>', opts)
+keymap('n', 'gw', ':lua vim.lsp.buf.document_symbol()<cr>', opts)
+keymap('n', 'gw', ':lua vim.lsp.buf.workspace_symbol()<cr>', opts)
+keymap('n', 'gr', ':lua vim.lsp.buf.references()<cr>', opts)
+keymap('n', 'gt', ':lua vim.lsp.buf.type_definition()<cr>', opts)
+keymap('n', 'K', ':lua vim.lsp.buf.hover()<cr>', opts)
+keymap('n', '<c-k>', ':lua vim.lsp.buf.signature_help()<cr>', opts)
+keymap('n', '<leader>af', ':lua vim.lsp.buf.code_action()<cr>', opts)
+keymap('n', '<leader>rn', ':lua vim.lsp.buf.rename()<cr>', opts)
+
+
+
+--local mason = require("mason")
+--
+--local options = {
+-- ensure_installed = { "lua-language-server" }, -- not an option from mason.nvim
+--
+-- ui = {
+-- icons = {
+-- package_pending = " ",
+-- package_installed = " ",
+-- package_uninstalled = " ﮊ",
+-- },
+--
+-- keymaps = {
+-- toggle_server_expand = "<CR>",
+-- install_server = "i",
+-- update_server = "u",
+-- check_server_version = "c",
+-- update_all_servers = "U",
+-- check_outdated_servers = "C",
+-- uninstall_server = "X",
+-- cancel_installation = "<C-c>",
+-- },
+-- },
+--
+-- max_concurrent_installers = 10,
+--}
+--
+--
+--
+--mason.setup(options)
+