From 9650d6d51cecde9cd023615fc805822446654e08 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Tue, 22 Feb 2022 08:45:55 +0100 Subject: [PATCH] feat: use vim-illuminate --- lua/plugins.lua | 13 +------------ lua/plugins/lspconfig.lua | 6 ++++++ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/lua/plugins.lua b/lua/plugins.lua index 7da6758..b58e98f 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -84,18 +84,7 @@ return require('packer').startup(function(use) }) -- highlight current symbol - use({ - "nvim-treesitter/nvim-treesitter-refactor", - config = function () require("nvim-treesitter.configs").setup({ - refactor = { - highlight_definitions = { - enable = true, - clear_on_cursor_move = true, - }, - } - }) - end, - }) + use({"RRethy/vim-illuminate"}) -- language server use({ diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index a67d158..c181288 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -52,6 +52,9 @@ local extra_server_opts = { } local function custom_on_attach(client, buffer_nr) + -- onmifunc + vim.api.nvim_buf_set_option(0, "omnifunc", "v:lua.vim.lsp.omnifunc") + -- Helper function local opts = {noremap = true, silent = true} local function bufnnoremap(key, action) @@ -88,6 +91,9 @@ local function custom_on_attach(client, buffer_nr) if client.resolved_capabilities.document_formatting then vim.cmd("autocmd BufWritePre lua vim.lsp.buf.formatting_sync()") end + + -- vim-illuminate + require("illuminate").on_attach(client) end lsp_installer.on_server_ready(function(server)