From 312faec0a27c208da2a017b0e1ab1a6d2d686b5f Mon Sep 17 00:00:00 2001 From: Michaƫl Ball Date: Fri, 3 Jan 2025 15:34:03 +0000 Subject: Neovim conf updates --- neovim/.config/nvim/lua/config/colourscheme.lua | 2 +- neovim/.config/nvim/lua/config/lazy.lua | 2 +- neovim/.config/nvim/lua/plugins/cspell.lua | 6 ++- neovim/.config/nvim/lua/plugins/lspsaga.lua | 6 ++- neovim/.config/nvim/lua/plugins/lualine.lua | 7 ++- neovim/.config/nvim/lua/plugins/noice.lua | 2 +- neovim/.config/nvim/lua/plugins/nvim_cmp.lua | 3 -- neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua | 56 ++++------------------ neovim/.config/nvim/lua/settings.lua | 16 +------ 9 files changed, 30 insertions(+), 70 deletions(-) (limited to 'neovim/.config/nvim/lua') diff --git a/neovim/.config/nvim/lua/config/colourscheme.lua b/neovim/.config/nvim/lua/config/colourscheme.lua index 6eb72e7..78e71a5 100644 --- a/neovim/.config/nvim/lua/config/colourscheme.lua +++ b/neovim/.config/nvim/lua/config/colourscheme.lua @@ -1,4 +1,4 @@ -local colorscheme = "oxocarbon" +local colorscheme = "xcodehc" vim.o.background = "light" local ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) if not ok then diff --git a/neovim/.config/nvim/lua/config/lazy.lua b/neovim/.config/nvim/lua/config/lazy.lua index 723911e..f9671dc 100644 --- a/neovim/.config/nvim/lua/config/lazy.lua +++ b/neovim/.config/nvim/lua/config/lazy.lua @@ -30,7 +30,7 @@ require("lazy").setup({ }, -- Configure any other settings here. See the documentation for more details. -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "oxocarbon" }, missing = true }, + install = { colorscheme = { "xcodehc" }, missing = true }, -- automatically check for plugin updates checker = { enabled = true, notify = false }, }) diff --git a/neovim/.config/nvim/lua/plugins/cspell.lua b/neovim/.config/nvim/lua/plugins/cspell.lua index 7293326..33931b5 100644 --- a/neovim/.config/nvim/lua/plugins/cspell.lua +++ b/neovim/.config/nvim/lua/plugins/cspell.lua @@ -12,7 +12,11 @@ return { sources = { cspell.diagnostics, cspell.code_actions, - } + }, + should_attach = function(bufnr) + local bufname = vim.api.nvim_buf_get_name(bufnr) + return not bufname == 'gen.nvim' + end, } end, } diff --git a/neovim/.config/nvim/lua/plugins/lspsaga.lua b/neovim/.config/nvim/lua/plugins/lspsaga.lua index 53bff94..27173ec 100644 --- a/neovim/.config/nvim/lua/plugins/lspsaga.lua +++ b/neovim/.config/nvim/lua/plugins/lspsaga.lua @@ -11,7 +11,11 @@ return { }, lightbulb = { virtual_text = false, - } + }, + diagnostic = { + diagnostic_only_current = true, + border_follow = false, + }, }, keys = { { "gh", "Lspsaga finder", desc = "Lspsaga finder" }, diff --git a/neovim/.config/nvim/lua/plugins/lualine.lua b/neovim/.config/nvim/lua/plugins/lualine.lua index fda2e78..f1647b2 100644 --- a/neovim/.config/nvim/lua/plugins/lualine.lua +++ b/neovim/.config/nvim/lua/plugins/lualine.lua @@ -6,7 +6,7 @@ return { 'nvim-tree/nvim-web-devicons', }, { - "catppuccin/nvim", + 'catppuccin/nvim', name = "catppuccin", priority = 1000, lazy = false, @@ -14,6 +14,11 @@ return { term_colors = true, }, }, + { + 'neanias/everforest-nvim', + priority = 1000, + lazy = false, + }, { 'navarasu/onedark.nvim', lazy = false, diff --git a/neovim/.config/nvim/lua/plugins/noice.lua b/neovim/.config/nvim/lua/plugins/noice.lua index 09b628e..004b868 100644 --- a/neovim/.config/nvim/lua/plugins/noice.lua +++ b/neovim/.config/nvim/lua/plugins/noice.lua @@ -24,7 +24,7 @@ return { }, popupmenu = { enabled = true, - backend = "nui", + backend = "cmp", }, views = { cmdline_popup = { diff --git a/neovim/.config/nvim/lua/plugins/nvim_cmp.lua b/neovim/.config/nvim/lua/plugins/nvim_cmp.lua index fb7aaab..320b684 100644 --- a/neovim/.config/nvim/lua/plugins/nvim_cmp.lua +++ b/neovim/.config/nvim/lua/plugins/nvim_cmp.lua @@ -99,9 +99,6 @@ return { -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline(':', { - view = { - entries = { name = 'wildmenu', separator = '|' }, - }, sources = cmp.config.sources({ { name = 'path' } }, { diff --git a/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua b/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua index 251261d..fbae976 100644 --- a/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua +++ b/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua @@ -15,7 +15,7 @@ return { -- Use a loop to conveniently call 'setup' on multiple servers and -- map buffer local keybindings when the language server attaches local servers = { "bashls", "clangd", "cssls", "dockerls", "gopls", "htmx", "jsonls", "marksman", - "ruff", "rust_analyzer", "taplo", "yamlls" } + "ruff", "rust_analyzer", "taplo", "ts_ls", "yamlls" } for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup { capabilities = capabilities, @@ -94,51 +94,6 @@ return { }, } - require 'lspconfig'.ts_ls.setup { - filetypes = { 'typescript', 'typescriptreact', 'typescript.tsx' }, - capabilities = capabilities, - flags = { - debounce_text_changes = 150, - }, - } - - --require 'lspconfig'.pylsp.setup { - --settings = { - --pylsp = { - --plugins = { - --autopep8 = { - --enabled = false, - --}, - --black = { - --enabled = false, - --}, - --mccabe = { - --enabled = false, - --}, - --pycodestyle = { - --enabled = false, - --}, - --pyflakes = { - --enabled = false, - --}, - --pylsp_mypy = { - --enabled = false, - --}, - --ruff = { - --enabled = false, - --}, - --yapf = { - --enabled = false, - --}, - --} - --} - --}, - --capabilities = capabilities, - --flags = { - --debounce_text_changes = 150, - --}, - --} - require 'lspconfig'.intelephense.setup { filetypes = { 'php' }, capabilities = capabilities, @@ -181,6 +136,15 @@ return { end, desc = 'LSP: Disable hover capability from Ruff', }) + + -- Disable diagnostics for gen.nvim + vim.api.nvim_create_autocmd({ "LspAttach" }, { + group = vim.api.nvim_create_augroup("lsp_disable", { clear = true }), + pattern = 'gen.nvim', + callback = function(args) + vim.diagnostic.enable(false, { bufnr = args.buf }) + end, + }) end, }, } diff --git a/neovim/.config/nvim/lua/settings.lua b/neovim/.config/nvim/lua/settings.lua index 6daf849..4bba27b 100644 --- a/neovim/.config/nvim/lua/settings.lua +++ b/neovim/.config/nvim/lua/settings.lua @@ -173,19 +173,5 @@ end vim.diagnostic.config({ underline = { severity = vim.diagnostic.severity.ERROR }, -}) - --- Disable diagnostics for gen.nvim -local lsp_grp = vim.api.nvim_create_augroup("lsp_disable", { clear = true }) -vim.api.nvim_create_autocmd({ "LspAttach" }, { - group = lsp_grp, - callback = function(args) - if vim.bo.buftype == "nofile" then - local bufnr = args.buf - vim.diagnostic.enable(false, { bufnr = bufnr }) - for _, client in ipairs(vim.lsp.get_clients({ bufnr = bufnr })) do - vim.lsp.buf_detach_client(bufnr, client.id) - end - end - end + virtual_text = false, }) -- cgit v1.2.3