update
This commit is contained in:
parent
0d451f9b04
commit
b57d625a5d
3 changed files with 26 additions and 9 deletions
|
|
@ -86,22 +86,22 @@ local on_attach = function(client, bufnr)
|
|||
-- buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||
|
||||
if client.name == 'phpactor' then
|
||||
client.resolved_capabilities.find_references = false;
|
||||
client.server_capabilities.find_references = false;
|
||||
end
|
||||
|
||||
if client.name == 'tsserver' or client.name == 'intelephense' then
|
||||
client.resolved_capabilities.document_formatting = false;
|
||||
-- print(vim.inspect(client.resolved_capabilities));
|
||||
client.server_capabilities.document_formatting = false;
|
||||
-- print(vim.inspect(client.server_capabilities));
|
||||
end
|
||||
|
||||
if client.resolved_capabilities.document_formatting then
|
||||
if client.server_capabilities.document_formatting then
|
||||
vim.cmd [[augroup lsp_formatting]]
|
||||
vim.cmd [[autocmd!]]
|
||||
vim.cmd [[autocmd BufWritePre <buffer> :lua vim.lsp.buf.formatting_seq_sync({}, 3000)]]
|
||||
vim.cmd [[augroup END]]
|
||||
end
|
||||
|
||||
if client.resolved_capabilities.document_highlight then
|
||||
if client.server_capabilities.document_highlight then
|
||||
vim.cmd [[
|
||||
augroup lsp_document_highlight
|
||||
autocmd! * <buffer>
|
||||
|
|
@ -201,7 +201,10 @@ local sources = {
|
|||
root .. "/node_modules/@wordpress/scripts/config/.eslintignore"
|
||||
}
|
||||
}), --
|
||||
null_ls.builtins.diagnostics.eslint,
|
||||
-- null_ls.builtins.diagnostics.eslint.with({
|
||||
-- filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte", "astro" },
|
||||
-- command = eslint_command
|
||||
-- }),
|
||||
-- null_ls.builtins.diagnostics.eslint.with({
|
||||
-- condition = function(utils)
|
||||
-- local has_file1 = utils.root_has_file({".eslintrc.js"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue