From 55cc17b86addd3e050e4bc340e89d8852254d5e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Kmie=C4=87?= Date: Mon, 24 Jul 2023 11:00:32 +0200 Subject: [PATCH] Nvim: remove unused modules, update configs --- .config/nvim/lua/plugins/femaco.lua | 1 - .config/nvim/lua/plugins/illuminate.lua | 36 ++++++++------ .config/nvim/lua/plugins/init.lua | 66 ++++--------------------- .config/nvim/lua/plugins/lspconfig.lua | 23 +++++++++ .config/nvim/lua/plugins/snippets.lua | 4 +- 5 files changed, 56 insertions(+), 74 deletions(-) diff --git a/.config/nvim/lua/plugins/femaco.lua b/.config/nvim/lua/plugins/femaco.lua index 60ad422..52f758d 100644 --- a/.config/nvim/lua/plugins/femaco.lua +++ b/.config/nvim/lua/plugins/femaco.lua @@ -1,5 +1,4 @@ return { ---require('femaco').setup() 'AckslD/nvim-FeMaco.lua', config = true } diff --git a/.config/nvim/lua/plugins/illuminate.lua b/.config/nvim/lua/plugins/illuminate.lua index 77699b4..3ba79b3 100644 --- a/.config/nvim/lua/plugins/illuminate.lua +++ b/.config/nvim/lua/plugins/illuminate.lua @@ -5,15 +5,23 @@ return { vim.api.nvim_create_augroup(HIGHLIGHT, { clear = true }) require('murmur').setup { - cursor_rgb = 'darkgreen', -- default to '#393939' + cursor_rgb = { + --guibg = '#393939', + gui = "underdotted" + }, + cursor_rgb_always_use_config = true, max_len = 80, -- maximum word-length to highlight - -- disable_on_lines = 2000, -- to prevent lagging on large files. Default to 2000 lines. + disable_on_lines = 2000, -- to prevent lagging on large files. Default to 2000 lines. + yank_blink = { + enabled = true, + on_yank = nil + }, exclude_filetypes = {'log'}, callbacks = { -- to trigger the close_events of vim.diagnostic.open_float. function () -- Close floating diag. and make it triggerable again. - vim.cmd('doautocmd InsertEnter') + vim.api.nvim_exec_autocmds("User", { pattern = "MurmurDiagnostics"}) vim.w.diag_shown = false end, } @@ -27,23 +35,21 @@ return { -- open float-win when hovering on a cursor-word. if vim.w.cursor_word ~= '' then - vim.diagnostic.open_float(nil, { - focusable = true, - close_events = { 'InsertEnter' }, - border = 'rounded', - source = 'always', - prefix = ' ', + vim.diagnostic.open_float({ scope = 'cursor', + close_events = { "InsertEnter", "User MurmurDiagnostics" }, + }) + vim.api.nvim_create_autocmd("WinClosed", { + group = HIGHLIGHT, + buffer = buf, + once = true, + callback = function() vim.w.diag_shown = false end, }) vim.w.diag_shown = true + else + vim.w.diag_shown = false end end }) end - -- 'tzachar/local-highlight.nvim', - -- config = function() - -- require('local-highlight').setup({ - -- file_types = {'python', 'cpp', 'rust', 'lua', 'cmake'} - -- }) - -- end } diff --git a/.config/nvim/lua/plugins/init.lua b/.config/nvim/lua/plugins/init.lua index 3d77a71..c207c59 100644 --- a/.config/nvim/lua/plugins/init.lua +++ b/.config/nvim/lua/plugins/init.lua @@ -16,6 +16,7 @@ return {{ "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim", "nvim-lua/popup.nvim", +"stevearc/dressing.nvim", "wellle/targets.vim", -- }}} @@ -24,7 +25,7 @@ return {{ -- }}} -- Support for random filetypes {{{ ---"chrisbra/csv.vim", +"chrisbra/csv.vim", --"iamcco/markdown-preview.nvim",, { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} --"vim-pandoc/vim-pandoc", --"weirongxu/plantuml-previewer.vim", | @@ -34,17 +35,10 @@ return {{ -- Other plugins (external tools, etc) {{{ --"JMcKiern/vim-shoot", ---"MortenStabenau/matlab-vim", --"junegunn/goyo.vim", "protex/better-digraphs.nvim", -- }}} - -- Appearance {{{ ---"jaredgorski/spacecamp", ---"lifepillar/vim-gruvbox8", ---"marko-cerovac/material.nvim", ---"srcery-colors/srcery-vim", ---"tanvirtin/monokai.nvim", { 'anuvyklack/pretty-fold.nvim', config = function() @@ -66,43 +60,6 @@ return {{ }) end }, -"stevearc/dressing.nvim", ---"wuelnerdotexe/vim-enfocado", -{ - "fenetikm/falcon", - lazy = false, - config = function() - --vim.cmd([[ colorscheme falcon]]) - end -}, -{ - "casr/vim-colors-reference", - lazy = false, - config = function() - --vim.cmd([[ colorscheme reference]]) - end -}, -{ - "blazkowolf/gruber-darker.nvim", - lazy = false, - config = function() - vim.cmd([[ colorscheme gruber-darker]]) - end -}, -{ - "rebelot/kanagawa.nvim", - lazy = false, - config = function() - --vim.cmd([[ colorscheme kanagawa]]) - end -}, -{ - "tommcdo/vim-lion", - keys = { - { "gl", desc = "align to specific character to the left" }, - { "gL", desc = "align to specific character to the right" } - } -}, -- }}} -- Testing phase {{{ @@ -113,23 +70,20 @@ return {{ --require('lsp_lines').setup() --"mfussenegger/nvim-dap", ---"narutoxy/silicon.lua", --"nguyenvukhang/nvim-toggler", --"rgroli/other.nvim", " Currently doesn't support C/C++ --"smolovk/projector.nvim", "Pocco81/true-zen.nvim", --- {'krivahtoo/silicon.nvim', build = './install.sh', --- config = function() --- require('silicon').setup({ --- font = 'DaddyTimeMono Nerd Font=16', --- theme = 'Monokai Extended', --- }) --- end --- }, "nullchilly/fsread.nvim", "ziontee113/icon-picker.nvim", -"cbochs/grapple.nvim", -"shortcuts/no-neck-pain.nvim", +{ + "cbochs/grapple.nvim", + enabled = false +}, +{ + "shortcuts/no-neck-pain.nvim", + enabled = false, +}, --'jinzhongjia/PS_manager.nvim', -- }}} }} diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua index 8032035..27c94ef 100644 --- a/.config/nvim/lua/plugins/lspconfig.lua +++ b/.config/nvim/lua/plugins/lspconfig.lua @@ -121,6 +121,7 @@ return { capabilities = capabilities }, inlay_hints = { + inline = false, max_len_align = true, max_len_align_padding = 3, right_align = true, @@ -144,6 +145,28 @@ return { --on_publish_diagnostics = diagnostic_handler, }) + nvim_lsp.matlab_ls.setup({ + cmd = { "matlab-language-server", "--stdio"}, + filetypes = { "matlab" }, + handlers = { [ "workspace/configuration"] = function(_, _, ctx) + local client = vim.lsp.get_client_by_id(ctx.client_id) + return {client.config.settings.matlab} + end + }, + root_dir = nvim_lsp.util.find_git_ancestor, + single_file_support = false, + settings = { + matlab = { + indexWorkspace = true, + installPath = "/home/kmcr/.local/usr/MATLAB/R2021b", + matlabConnectionTiming = "onStart", + telemetry = true, + }, + }, + on_attach = on_attach, + capabilities = capabilities + }) + -- Use a loop to conveniently call 'setup' on multiple servers and -- map buffer local keybindings when the language server attaches local servers = { "cmake", "rust_analyzer", "bashls", "marksman" } diff --git a/.config/nvim/lua/plugins/snippets.lua b/.config/nvim/lua/plugins/snippets.lua index ea1e695..d542b4c 100644 --- a/.config/nvim/lua/plugins/snippets.lua +++ b/.config/nvim/lua/plugins/snippets.lua @@ -9,8 +9,8 @@ return { require('snippy').setup({ mappings = { is = { - [''] = 'expand_or_advance', - [''] = 'previous', + [''] = 'expand_or_advance', + [''] = 'previous', }, nx = { ['x'] = 'cut_text',