|
|
|
@ -111,6 +111,35 @@ cmp.setup {
|
|
|
|
|
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
|
|
|
|
|
local nvim_lsp = require('lspconfig')
|
|
|
|
|
|
|
|
|
|