diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 150f7b4..ac36c0e 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -991,7 +991,7 @@ hide_window_decorations yes #: The foreground and background colors. -background_opacity .7 +background_opacity .85 #: The opacity of the background. A number between zero and one, where #: one is opaque and zero is fully transparent. This will only work if diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index cc185ae..dbcc74b 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -1,15 +1,30 @@ -local lsp = require("lsp-zero") - -lsp.preset("recommended") - -lsp.ensure_installed({ - 'tsserver', - 'eslint', - 'sumneko_lua', - 'rust_analyzer', +local lsp = require('lsp-zero').preset({ + name = 'minimal', + set_lsp_keymaps = true, + manage_nvim_cmp = true, + suggest_lsp_servers = false, }) --- Fix Undefined global 'vim' +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 = { @@ -20,57 +35,17 @@ lsp.configure('sumneko_lua', { } }) - local cmp = require('cmp') -local cmp_select = { behavior = cmp.PreselectMode.None } --cmp.SelectBehavior.Select } -local cmp_mappings = lsp.defaults.cmp_mappings({ +local cmp_select = { behavior = cmp.SelectBehavior.Select } +lsp.setup_nvim_cmp({ + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.select_prev_item(cmp_select), [''] = cmp.mapping.select_next_item(cmp_select), [''] = cmp.mapping.confirm({ select = true }), - [""] = cmp.mapping.complete(), + }), }) -lsp.setup_nvim_cmp({ - mapping = cmp_mappings, - sources = { - { - name = 'conjure' - } - } -}) - -lsp.set_preferences({ - suggest_lsp_servers = false, - sign_icons = { - error = 'E', - warn = 'W', - hint = 'H', - info = 'I' - } -}) - -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.setup() - -vim.diagnostic.config({ - virtual_text = true, -}) diff --git a/.config/nvim/lua/ajet/remap.lua b/.config/nvim/lua/ajet/remap.lua index 35a8669..c7cb05b 100644 --- a/.config/nvim/lua/ajet/remap.lua +++ b/.config/nvim/lua/ajet/remap.lua @@ -40,7 +40,6 @@ vim.keymap.set("n", "F", vim.lsp.buf.format) --vim.keymap.set("n", "j", "lprevzz") vim.keymap.set("n", "s", [[:%s/\<\>//gI]]) -vim.keymap.set("n", "x", "!chmod +x %", { silent = true }) vim.keymap.set("t", "", "") diff --git a/.config/nvim/lua/ajet/set.lua b/.config/nvim/lua/ajet/set.lua old mode 100644 new mode 100755 index 4cf14c4..5d8598c --- a/.config/nvim/lua/ajet/set.lua +++ b/.config/nvim/lua/ajet/set.lua @@ -8,7 +8,7 @@ vim.opt.softtabstop = 2 vim.opt.shiftwidth = 2 vim.opt.expandtab = true -vim.opt.foldlevel = 3 +vim.opt.foldlevel = 5 vim.opt.foldmethod = "expr" vim.opt.foldexpr = "nvim_treesitter#foldexpr()"