починил форматирование и добавил определение типа файла .log как json
This commit is contained in:
@@ -49,7 +49,7 @@ lspconfig_on_attach = function(client, bufnr)
|
||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, {noremap = true, silent = true, buffer = bufnr})
|
||||
|
||||
-- Форматирование
|
||||
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, {noremap = true, silent = true, buffer = bufnr})
|
||||
vim.keymap.set({'n', 'v', 't'}, 'F', function () vim.lsp.buf.format {async = true} end, {noremap = true, silent = true, buffer = bufnr})
|
||||
end
|
||||
|
||||
|
||||
|
@@ -21,4 +21,4 @@ vim.keymap.set({'n', 'i', 'v', 't'}, '<c-right>', '', {noremap = true, silent =
|
||||
vim.keymap.set({'n', 'i', 'v', 't'}, '<c-down>', '', {noremap = true, silent = true})
|
||||
|
||||
-- Быстрое форматирование всего документа
|
||||
vim.keymap.set({'n', 'v', 't'}, 'F', '1GVG=<cr>', {noremap = true, silent = true})
|
||||
vim.keymap.set({'n', 'v', 't'}, '<space>F', '1GVG=<cr>', {noremap = true, silent = true})
|
||||
|
@@ -11,16 +11,22 @@ local coq = require('coq')
|
||||
-- Инициализация LSP-серверов
|
||||
|
||||
-- Инициализация "psalm" (LSP-сервер для PHP)
|
||||
lspconfig.psalm.setup {
|
||||
lspconfig.psalm.setup({
|
||||
on_attach = lspconfig_on_attach,
|
||||
coq.lsp_ensure_capabilities()
|
||||
}
|
||||
})
|
||||
|
||||
-- Инициализация "vscode-html-language-server" (готовый набросок для HTML)
|
||||
lspconfig.html.setup {
|
||||
lspconfig.html.setup({
|
||||
on_attach = lspconfig_on_attach,
|
||||
capabilities = capabilities
|
||||
}
|
||||
})
|
||||
|
||||
-- Инициализация "vscode-html-language-server" (готовый набросок для CSS)
|
||||
lspconfig.cssls.setup({
|
||||
on_attach = lspconfig_on_attach,
|
||||
capabilities = capabilities
|
||||
})
|
||||
|
||||
-- Инициализация "vscode-langservers-extracted" (готовый набросок для JavaScript и PostScript)
|
||||
lspconfig.eslint.setup({
|
||||
@@ -35,3 +41,13 @@ lspconfig.eslint.setup({
|
||||
lspconfig_on_attach(client, bufnr)
|
||||
end,
|
||||
})
|
||||
|
||||
-- Инициализация "vscode-langservers-extracted" (готовый набросок для JSON)
|
||||
lspconfig.jsonls.setup({
|
||||
on_attach = lspconfig_on_attach,
|
||||
capabilities = capabilities,
|
||||
filetypes = {
|
||||
'json',
|
||||
'log'
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user