nvim: added (but disabled) symbol highlighting

master
tiyn 2 years ago
parent 74d1c0cf2c
commit 5e8568e368

@ -48,6 +48,7 @@ return require("packer").startup(function(use)
requires = {'hrsh7th/cmp-buffer', requires = {'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path', 'hrsh7th/cmp-path',
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-nvim-lsp',
'antoinemadec/fixcursorhold.nvim',
'l3mon4d3/luasnip', 'l3mon4d3/luasnip',
'saadparwaiz1/cmp_luasnip', 'saadparwaiz1/cmp_luasnip',
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',

@ -111,6 +111,35 @@ cmp.setup {
require("luasnip.loaders.from_snipmate").lazy_load() require("luasnip.loaders.from_snipmate").lazy_load()
-- local on_attach = function(client, bufnr)
-- if client.server_capabilities.documentHighlightProvider then
-- vim.cmd [[
-- hi! LspReferenceRead cterm=bold ctermbg=red guibg=LightYellow
-- hi! LspReferenceText cterm=bold ctermbg=red guibg=LightYellow
-- hi! LspReferenceWrite cterm=bold ctermbg=red guibg=LightYellow
-- ]]
-- vim.api.nvim_create_augroup('lsp_document_highlight', {
-- clear = false
-- })
-- vim.api.nvim_clear_autocmds({
-- buffer = bufnr,
-- group = 'lsp_document_highlight',
-- })
-- vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
-- group = 'lsp_document_highlight',
-- buffer = bufnr,
-- callback = vim.lsp.buf.document_highlight,
-- })
-- vim.api.nvim_create_autocmd('CursorMoved', {
-- group = 'lsp_document_highlight',
-- buffer = bufnr,
-- callback = vim.lsp.buf.clear_references,
-- })
-- end
-- end
--
-- vim.g.cursorhold_updatetime = 100
-- neovim/nvim-lspconfig -- neovim/nvim-lspconfig
local nvim_lsp = require('lspconfig') local nvim_lsp = require('lspconfig')

Loading…
Cancel
Save