From cca93ec5cccc5c39df7a582a3bef2146e66a0a6a Mon Sep 17 00:00:00 2001 From: qwjyh Date: Tue, 14 Mar 2023 12:14:11 +0900 Subject: [PATCH] add: nvim: illuminate whichkey trouble --- dotfiles/neovim/init.lua | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index d90afd8..636630f 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -16,6 +16,17 @@ vim.opt.rtp:prepend(lazypath) -- Installing plugins require('lazy').setup({ { "catppuccin/nvim", name = "catppuccin" }, -- Color scheme + { + 'folke/which-key.nvim', + config = function() + vim.o.timeout = true + vim.o.timeoutlen = 300 + require('which-key').setup { + + } + end, + }, + { 'RRethy/vim-illuminate', }, -- highlight keywords under cursor { -- comment 'numToStr/Comment.nvim', config = function () @@ -72,6 +83,10 @@ require('lazy').setup({ 'nvim-lua/plenary.nvim' }, }, + { + 'folke/trouble.nvim', + -- config = function + }, }) ----------------------------------------------------------- @@ -344,13 +359,25 @@ lspconfig.satysfi_ls.setup { autostart = true, } -- bash -lspconfig.bashls.setup {} +lspconfig.bashls.setup { + on_attach = on_attach, + capabilities = capabilities, +} -- python -lspconfig.pyright.setup {} +lspconfig.pyright.setup { + on_attach = on_attach, + capabilities = capabilities, +} -- rust -lspconfig.rust_analyzer.setup {} +lspconfig.rust_analyzer.setup { + on_attach = on_attach, + capabilities = capabilities, +} -- tex -lspconfig.texlab.setup {} +lspconfig.texlab.setup { + on_attach = on_attach, + capabilities = capabilities, +} -- nvim-cmp setup local cmp = require 'cmp'