diff --git a/.bashrc b/.bashrc index 4247fd5..ce5fbae 100644 --- a/.bashrc +++ b/.bashrc @@ -132,9 +132,9 @@ alias vi="nvim" alias v="nvim" #upgraded commands -alias cat="bat" +#alias cat="bat" alias htop="btop" -alias ls="exa" +#alias ls="exa" #devleopment variables TMUX_CONFIG="~/.config/tmux/.tmux.conf" diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index dbcc74b..6703e41 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -3,36 +3,35 @@ local lsp = require('lsp-zero').preset({ set_lsp_keymaps = true, manage_nvim_cmp = true, suggest_lsp_servers = false, + on_attach = function(client, bufnr) + local opts = { buffer = bufnr, remap = false } + + if client.name == "eslint" then + vim.cmd.LspStop('eslint') + return + end + + vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts) + vim.keymap.set("n", "K", vim.lsp.buf.hover, opts) + vim.keymap.set("n", "fs", vim.lsp.buf.workspace_symbol, opts) + vim.keymap.set("n", "vd", vim.diagnostic.open_float, opts) + vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts) + vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) + vim.keymap.set("n", "ca", vim.lsp.buf.code_action, opts) + vim.keymap.set("n", "gr", vim.lsp.buf.references, opts) + vim.keymap.set("n", "rn", vim.lsp.buf.rename, opts) + vim.keymap.set("i", "", vim.lsp.buf.signature_help, opts) + end }) -lsp.on_attach(function(client, bufnr) - local opts = { buffer = bufnr, remap = false } - - if client.name == "eslint" then - vim.cmd.LspStop('eslint') - return - end - - vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts) - vim.keymap.set("n", "K", vim.lsp.buf.hover, opts) - vim.keymap.set("n", "fs", vim.lsp.buf.workspace_symbol, opts) - vim.keymap.set("n", "vd", vim.diagnostic.open_float, opts) - vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts) - vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) - vim.keymap.set("n", "ca", vim.lsp.buf.code_action, opts) - vim.keymap.set("n", "gr", vim.lsp.buf.references, opts) - vim.keymap.set("n", "rn", vim.lsp.buf.rename, opts) - vim.keymap.set("i", "", vim.lsp.buf.signature_help, opts) -end) - lsp.configure('sumneko_lua', { - settings = { - Lua = { - diagnostics = { - globals = { 'vim' } - } - } + settings = { + Lua = { + diagnostics = { + globals = { 'vim' } + } } + } }) local cmp = require('cmp')