-- Quickstart configs for Nvim LSP return { 'neovim/nvim-lspconfig', enabled = true, lazy = false, priority = 70, dependencies = { -- 🌈 Plugin that creates missing LSP diagnostics -- highlight groups for color schemes that do not -- yet support the Neovim 0.5 builtin LSP client { 'folke/lsp-colors.nvim' }, -- A completion plugin for neovim coded in Lua. { 'hrsh7th/nvim-cmp' }, -- πŸ’« Extensible UI for Neovim notifications and LSP progress messages { 'j-hui/fidget.nvim' } }, init = function() end, config = function() -- @todo навСсти порядок -- Активация вСщания Π³ΠΎΡ‚ΠΎΠ²Ρ‹Ρ… набросков local capabilities = require('cmp_nvim_lsp').default_capabilities() -- Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΡ LSP-сСрвСров -- Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΡ 'bmewburn/vscode-intelephense' (LSP-сСрвСр для PHP) vim.lsp.config( 'intelephense', { on_attach = lspconfig_on_attach, capabilities = capabilities } ) vim.lsp.enable('intelephense') -- Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΡ 'hrsh7th/vscode-html-language-server' (LSP-сСрвСр для HTML) vim.lsp.config( 'html', { init_options = { configurationSection = { 'html' }, embeddedLanguages = { css = false, javascript = false }, provideFormatter = true, }, on_attach = lspconfig_on_attach, capabilities = capabilities } ) vim.lsp.enable('html') -- Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΡ 'aca/emmet-ls' (LSP-сСрвСр для HTML) vim.lsp.config( 'emmet_ls', { init_options = { html = { options = { ['bem.enabled'] = true, }, }, }, on_attach = lspconfig_on_attach, capabilities = capabilities }) vim.lsp.enable('emmet_ls') -- Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΡ 'hrsh7th/vscode-langservers-extracted' (LSP-сСрвСр для CSS) vim.lsp.config( 'cssls', { settings = { css = { validate = true }, less = { validate = true }, scss = { validate = true } }, on_attach = lspconfig_on_attach, capabilities = capabilities }) vim.lsp.enable('cssls') -- Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΡ 'antonk52/cssmodules-language-server' (LSP-сСрвСр для JS, Π²ΡΠΏΠΎΠΌΠΎΠ³Π°Ρ‚Π΅Π»ΡŒΠ½Ρ‹ΠΉ для CSS) vim.lsp.config( 'cssmodules_ls', { init_options = { camelCase = false, }, on_attach = lspconfig_on_attach, capabilities = capabilities }) vim.lsp.enable('cssmodules_ls') -- Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΡ 'denoland/deno' (LSP-сСрвСр для JavaScript ΠΈ PostScript) vim.lsp.config( 'denols', { init_options = { enable = true, unstable = false }, on_attach = lspconfig_on_attach, capabilities = capabilities }) vim.lsp.enable('denols') -- Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΡ 'hrsh7th/vscode-langservers-extracted' (LSP-сСрвСр для JSON) vim.lsp.config( 'jsonls', { on_attach = lspconfig_on_attach, capabilities = capabilities }) vim.lsp.enable('jsonls') -- Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΡ 'luals/lua-language-server' (LSP-сСрвСр для Lua) vim.lsp.config( 'lua_ls', { settings = { Lua = { runtime = { -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) version = 'LuaJIT', }, diagnostics = { -- Get the language server to recognize the `vim` global globals = { 'vim' }, }, workspace = { -- Make the server aware of Neovim runtime files library = vim.api.nvim_get_runtime_file('', true), }, -- Do not send telemetry data containing a randomized but unique identifier telemetry = { enable = false, }, }, }, on_attach = lspconfig_on_attach, capabilities = capabilities } ) vim.lsp.enable('lua_ls') end, }