update
This commit is contained in:
commit
22be77e7e6
@ -365,7 +365,7 @@ require('packer').startup(function(use)
|
|||||||
vim.g.doom_one_plugin_startify = true
|
vim.g.doom_one_plugin_startify = true
|
||||||
vim.g.doom_one_plugin_whichkey = true
|
vim.g.doom_one_plugin_whichkey = true
|
||||||
vim.g.doom_one_plugin_indent_blankline = true
|
vim.g.doom_one_plugin_indent_blankline = true
|
||||||
vim.g.doom_one_plugin_vim_illuminate = true
|
vim.g.doom_one_plugin_vim_illuminate = false
|
||||||
vim.g.doom_one_plugin_lspsaga = false
|
vim.g.doom_one_plugin_lspsaga = false
|
||||||
end,
|
end,
|
||||||
config = function()
|
config = function()
|
||||||
|
@ -6,31 +6,7 @@ local lspconfig = require('lspconfig')
|
|||||||
local luasnip = require 'luasnip'
|
local luasnip = require 'luasnip'
|
||||||
local highlight = require('cmp.utils.highlight')
|
local highlight = require('cmp.utils.highlight')
|
||||||
|
|
||||||
local highlight_symbol_under_cursor = function()
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
-- if the client has not resolved the document highlight capability, then
|
|
||||||
-- don't do anything
|
|
||||||
if not vim.lsp.buf.document_highlight then return end
|
|
||||||
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', 'CursorMovedI' }, {
|
|
||||||
group = 'lsp_document_highlight',
|
|
||||||
buffer = bufnr,
|
|
||||||
callback = vim.lsp.buf.clear_references
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
local has_words_before = function()
|
local has_words_before = function()
|
||||||
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then
|
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then
|
||||||
@ -237,8 +213,6 @@ cmp.setup.cmdline(':', {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|
||||||
|
|
||||||
local servers = {
|
local servers = {
|
||||||
'bashls', 'jedi_language_server', 'jsonls', 'yamlls', 'vimls', 'dotls',
|
'bashls', 'jedi_language_server', 'jsonls', 'yamlls', 'vimls', 'dotls',
|
||||||
'dockerls', 'html', 'cssls', 'lua_ls'
|
'dockerls', 'html', 'cssls', 'lua_ls'
|
||||||
@ -252,10 +226,7 @@ for _, lsp in ipairs(servers) do
|
|||||||
callSnippet = "Replace"
|
callSnippet = "Replace"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lspconfig[lsp].setup {
|
lspconfig[lsp].setup {capabilities = capabilities}
|
||||||
-- on_attach = highlight_symbol_under_cursor(),
|
|
||||||
capabilities = capabilities
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ ts.setup({
|
|||||||
-- map actions.which_key to <C-h> (default: <C-/>)
|
-- map actions.which_key to <C-h> (default: <C-/>)
|
||||||
-- actions.which_key shows the mappings for your picker,
|
-- actions.which_key shows the mappings for your picker,
|
||||||
-- e.g. git_{create, delete, ...}_branch for the git_branches picker
|
-- e.g. git_{create, delete, ...}_branch for the git_branches picker
|
||||||
-- ["<C-/?>"] = "which_key"
|
["<C-/>"] = "which_key"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
file_ignore_patterns = { "^node_modules/", "^env/", "^__pycache__/" }
|
file_ignore_patterns = { "^node_modules/", "^env/", "^__pycache__/" }
|
||||||
|
Loading…
Reference in New Issue
Block a user