From ce27dbe7e8cdbcac7589baf80d72a705a8d21fc4 Mon Sep 17 00:00:00 2001 From: mirzaev Date: Tue, 21 Mar 2023 06:26:16 +1000 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D1=89=D0=B8=D0=BA=D0=B8=20=D0=B8=20LSP-=D1=81?= =?UTF-8?q?=D0=B5=D1=80=D0=B2=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/.luarc.json | 44 ++++++++++++ lua/keymaps/plugins.lua | 116 ++++++++++++++++---------------- lua/plugins/lspconfig.lua | 84 +++++++++++++++++++++-- lua/plugins/packer.lua | 112 ++++++++++++++++--------------- lua/settings/system.lua | 4 +- plugin/packer_compiled.lua | 133 +++++++++++++++++++------------------ 6 files changed, 310 insertions(+), 183 deletions(-) create mode 100644 lua/.luarc.json diff --git a/lua/.luarc.json b/lua/.luarc.json new file mode 100644 index 0000000..bc127bf --- /dev/null +++ b/lua/.luarc.json @@ -0,0 +1,44 @@ +{ + "workspace.library": [ + "/home/mirzaev/.config/nvim", + "/home/mirzaev/.local/share/nvim/site", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/bufferline.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/coq.artifacts", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/coq.thirdparty", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/coq_nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/diaglist.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/fidget.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/kommentary", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/lsp-colors.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/lspkind-nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/lualine-lsp-progress", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/lualine.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/lush.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/neo-tree.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/nginx.vim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/nui.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/nvim-autopairs", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/nvim-dap", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/nvim-lint", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/nvim-treesitter", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/packer.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/phpctags", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/plenary.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/tagbar", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/telescope.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/trouble.nvim", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/vim-fish", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/vim-fugitive", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/vim-prettier", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/vim-signify", + "/home/mirzaev/.local/share/nvim/site/pack/packer/start/vim-test", + "/home/mirzaev/.local/share/nvim/site/pack/packer/opt/nvim-lspconfig", + "/snap/nvim/2789/usr/share/nvim/runtime", + "/snap/nvim/2789/usr/share/nvim/runtime/pack/dist/opt/matchit", + "${3rd}/luassert/library", + "${3rd}/luv/library" + ] +} \ No newline at end of file diff --git a/lua/keymaps/plugins.lua b/lua/keymaps/plugins.lua index 957cb05..4055385 100644 --- a/lua/keymaps/plugins.lua +++ b/lua/keymaps/plugins.lua @@ -1,60 +1,60 @@ --[[ nvim-neo-tree/neo-tree ]] - -- Открыть интерфейс с древовидным отображением файлов -vim.keymap.set({'n', 'i', 'v', 't'}, '', 'NeoTreeRevealToggle', {noremap = true}) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', 'NeoTreeRevealToggle', { noremap = true }) -- [[ folke/trouble.nvim ]] -vim.keymap.set({'n', 'i', 'v', 't'}, '', 'TroubleToggle', {noremap = true}) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', 'TroubleToggle', { noremap = true }) --[[ onsails/diaglist.nvim ]] - -- Открыть интерфейс диагностики -vim.keymap.set('n', 'dw', 'lua require(\'diaglist\').open_all_diagnostics()', {noremap = true}) -vim.keymap.set('n', 'd0', 'lua require(\'diaglist\').open_buffer_diagnostics()', {noremap = true}) +vim.keymap.set('n', 'dw', 'lua require(\'diaglist\').open_all_diagnostics()', { noremap = true }) +vim.keymap.set('n', 'd0', 'lua require(\'diaglist\').open_buffer_diagnostics()', { noremap = true }) --[[ noib3/nvim-cokeline ]] - -- Переключение вкладок -vim.keymap.set('n', '', '(cokeline-focus-next)', {noremap = true, silent = true}) -vim.keymap.set('n', '', '(cokeline-focus-prev)', {noremap = true, silent = true}) +vim.keymap.set('n', '', '(cokeline-focus-next)', { noremap = true, silent = true }) +vim.keymap.set('n', '', '(cokeline-focus-prev)', { noremap = true, silent = true }) --[[ neovim/nvim-lspconfig ]] - -- Диагностика -vim.keymap.set('n', 'e', vim.diagnostic.open_float, {noremap = true, silent = true}) -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, {noremap = true, silent = true}) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next, {noremap = true, silent = true}) -vim.keymap.set('n', 'q', vim.diagnostic.setloclist, {noremap = true, silent = true}) +vim.keymap.set('n', 'e', vim.diagnostic.open_float, { noremap = true, silent = true }) +vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { noremap = true, silent = true }) +vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { noremap = true, silent = true }) +vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { noremap = true, silent = true }) -- Инициализация только после того, как LSP-сервер подключится к текущему буферу lspconfig_on_attach = function(client, bufnr) -- Активация завершения vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, {noremap = true, silent = true, buffer = bufnr}) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {noremap = true, silent = true, buffer = bufnr}) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, {noremap = true, silent = true, buffer = bufnr}) - vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, {noremap = true, silent = true, buffer = bufnr}) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, {noremap = true, silent = true, buffer = bufnr}) - vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, {noremap = true, silent = true, buffer = bufnr}) - vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, {noremap = true, silent = true, buffer = bufnr}) - vim.keymap.set('n', 'wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, {noremap = true, silent = true, buffer = bufnr}) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, {noremap = true, silent = true, buffer = bufnr}) - vim.keymap.set('n', 'rn', vim.lsp.buf.rename, {noremap = true, silent = true, buffer = bufnr}) - vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, {noremap = true, silent = true, buffer = bufnr}) - vim.keymap.set('n', 'gr', vim.lsp.buf.references, {noremap = true, silent = true, buffer = bufnr}) + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, { noremap = true, silent = true, buffer = bufnr }) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { noremap = true, silent = true, buffer = bufnr }) + vim.keymap.set('n', 'K', vim.lsp.buf.hover, { noremap = true, silent = true, buffer = bufnr }) + vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, { noremap = true, silent = true, buffer = bufnr }) + vim.keymap.set('n', '', vim.lsp.buf.signature_help, { noremap = true, silent = true, buffer = bufnr }) + vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, { noremap = true, silent = true, buffer = bufnr }) + vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, { noremap = true, silent = true, buffer = bufnr }) + vim.keymap.set('n', 'wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, + { noremap = true, silent = true, buffer = bufnr }) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, { noremap = true, silent = true, buffer = bufnr }) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, { noremap = true, silent = true, buffer = bufnr }) + vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, { noremap = true, silent = true, buffer = bufnr }) + vim.keymap.set('n', 'gr', vim.lsp.buf.references, { 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}) + vim.keymap.set({ 'n', 'v', 't' }, 'F', function() + vim.lsp.buf.format { async = true } + vim.api.nvim_command('PrettierAsync') + end, + { noremap = true, silent = true, buffer = bufnr }) end --[[ lewis6991/gitsigns.nvim ]] - -- Инициализация только после того, как LSP-сервер подключится к текущему буферу gitsigns_on_attach = function(bufnr) -- Инициализация ярлыка @@ -65,54 +65,52 @@ gitsigns_on_attach = function(bufnr) if vim.wo.diff then return ']c' end vim.schedule(function() gs.next_hunk() end) return '' - end, {expr = true, buffer = bufnr}) + end, { expr = true, buffer = bufnr }) -- Навигация vim.keymap.set('n', '[c', function() if vim.wo.diff then return '[c' end vim.schedule(function() gs.prev_hunk() end) return '' - end, {expr = true, buffer = bufnr}) + end, { expr = true, buffer = bufnr }) - vim.keymap.set('n', 'hs', 'Gitsigns stage_hunk', {buffer = bufnr}) - vim.keymap.set('v', 'hs', 'Gitsigns stage_hunk', {buffer = bufnr}) - vim.keymap.set('n', 'hr', 'Gitsigns reset_hunk', {buffer = bufnr}) - vim.keymap.set('v', 'hr', 'Gitsigns reset_hunk', {buffer = bufnr}) - vim.keymap.set('n', 'hS', gs.stage_buffer, {buffer = bufnr}) - vim.keymap.set('n', 'hu', gs.undo_stage_hunk, {buffer = bufnr}) - vim.keymap.set('n', 'hR', gs.reset_buffer, {buffer = bufnr}) - vim.keymap.set('n', 'hp', gs.preview_hunk, {buffer = bufnr}) - vim.keymap.set('n', 'hb', function() gs.blame_line{full=true} end, {buffer = bufnr}) - vim.keymap.set('n', 'tb', gs.toggle_current_line_blame, {buffer = bufnr}) - vim.keymap.set('n', 'hd', gs.diffthis, {buffer = bufnr}) - vim.keymap.set('n', 'hD', function() gs.diffthis('~') end, {buffer = bufnr}) - vim.keymap.set('n', 'td', gs.toggle_deleted, {buffer = bufnr}) + vim.keymap.set('n', 'hs', 'Gitsigns stage_hunk', { buffer = bufnr }) + vim.keymap.set('v', 'hs', 'Gitsigns stage_hunk', { buffer = bufnr }) + vim.keymap.set('n', 'hr', 'Gitsigns reset_hunk', { buffer = bufnr }) + vim.keymap.set('v', 'hr', 'Gitsigns reset_hunk', { buffer = bufnr }) + vim.keymap.set('n', 'hS', gs.stage_buffer, { buffer = bufnr }) + vim.keymap.set('n', 'hu', gs.undo_stage_hunk, { buffer = bufnr }) + vim.keymap.set('n', 'hR', gs.reset_buffer, { buffer = bufnr }) + vim.keymap.set('n', 'hp', gs.preview_hunk, { buffer = bufnr }) + vim.keymap.set('n', 'hb', function() gs.blame_line { full = true } end, { buffer = bufnr }) + vim.keymap.set('n', 'tb', gs.toggle_current_line_blame, { buffer = bufnr }) + vim.keymap.set('n', 'hd', gs.diffthis, { buffer = bufnr }) + vim.keymap.set('n', 'hD', function() gs.diffthis('~') end, { buffer = bufnr }) + vim.keymap.set('n', 'td', gs.toggle_deleted, { buffer = bufnr }) - vim.keymap.set('o', 'ih', 'Gitsigns select_hunk', {buffer = bufnr}) - vim.keymap.set('x', 'ih', 'Gitsigns select_hunk', {buffer = bufnr}) + vim.keymap.set('o', 'ih', 'Gitsigns select_hunk', { buffer = bufnr }) + vim.keymap.set('x', 'ih', 'Gitsigns select_hunk', { buffer = bufnr }) end --[[ nvim-telescope/telescope.nvim ]] - -- Инициализация ярлыка local builtin = require('telescope.builtin') -- Поиск файла -vim.keymap.set('n', 'ff', builtin.find_files, {noremap = true, silent = true}) +vim.keymap.set('n', 'ff', builtin.find_files, { noremap = true, silent = true }) -- grep -vim.keymap.set('n', 'fg', builtin.live_grep, {noremap = true, silent = true}) +vim.keymap.set('n', 'fg', builtin.live_grep, { noremap = true, silent = true }) -- Буферы? -vim.keymap.set('n', 'fb', builtin.buffers, {noremap = true, silent = true}) +vim.keymap.set('n', 'fb', builtin.buffers, { noremap = true, silent = true }) -- Помощь -vim.keymap.set('n', 'fh', builtin.help_tags, {noremap = true, silent = true}) +vim.keymap.set('n', 'fh', builtin.help_tags, { noremap = true, silent = true }) --[[ windwp/nvim-autopairs ]] - -- Переназначение стандартных сочетаний клавиш для "ms-jpq/coq_nvim" --vim.keymap.set('i', '', [[pumvisible() ? "" : ""]], {expr = true, noremap = true}) --vim.keymap.set('i', '', [[pumvisible() ? "" : ""]], {expr = true, noremap = true}) @@ -138,17 +136,17 @@ end --[[ b3nj5m1n/kommentary ]] -vim.keymap.set('n', 'cic', 'kommentary_line_increase', {noremap = true, silent = true}) -vim.keymap.set('n', 'ci', 'kommentary_motion_increase', {noremap = true, silent = true}) -vim.keymap.set('x', 'ci', 'kommentary_visual_increase', {noremap = true, silent = true}) -vim.keymap.set('n', 'cdc', 'kommentary_line_decrease', {noremap = true, silent = true}) -vim.keymap.set('n', 'cd', 'kommentary_motion_decrease', {noremap = true, silent = true}) -vim.keymap.set('x', 'cd', 'kommentary_visual_decrease', {noremap = true, silent = true}) +vim.keymap.set('n', 'cic', 'kommentary_line_increase', { noremap = true, silent = true }) +vim.keymap.set('n', 'ci', 'kommentary_motion_increase', { noremap = true, silent = true }) +vim.keymap.set('x', 'ci', 'kommentary_visual_increase', { noremap = true, silent = true }) +vim.keymap.set('n', 'cdc', 'kommentary_line_decrease', { noremap = true, silent = true }) +vim.keymap.set('n', 'cd', 'kommentary_motion_decrease', { noremap = true, silent = true }) +vim.keymap.set('x', 'cd', 'kommentary_visual_decrease', { noremap = true, silent = true }) --[[ preservim/tagbar ]] -vim.keymap.set({'n', 'i', 'v', 't'}, '', 'TagbarToggle', {noremap = true, silent = true}) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', 'TagbarToggle', { noremap = true, silent = true }) --[[ simrat39/symbols-outline.nvim ]] -vim.keymap.set({'n', 'i', 'v', 't'}, '', 'SymbolsOutline', {noremap = true, silent = true}) +vim.keymap.set({ 'n', 'i', 'v', 't' }, '', 'SymbolsOutline', { noremap = true, silent = true }) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 9fad143..c6f8a9a 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,7 +1,7 @@ -- Инициализация "neovim/nvim-lspconfig" local lspconfig = require('lspconfig') --- Активация вещания готовых набросков +-- Активация вещания готовых набросков local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.snippetSupport = true @@ -17,30 +17,104 @@ lspconfig.intelephense.setup({ capabilities = capabilities }) --- Инициализация "vscode-html-language-server" (LSP-сервер для HTML) +-- Инициализация "hrsh7th/vscode-html-language-server" (LSP-сервер для HTML) lspconfig.html.setup({ + init_options = { + configurationSection = { 'html' }, + embeddedLanguages = { + css = false, + javascript = false + }, + provideFormatter = true, + }, on_attach = lspconfig_on_attach, coq.lsp_ensure_capabilities(), capabilities = capabilities }) --- Инициализация "vscode-html-language-server" (LSP-сервер для CSS) +-- Инициализация "aca/emmet-ls" (LSP-сервер для HTML) +lspconfig.emmet_ls.setup({ + init_options = { + html = { + options = { + ["bem.enabled"] = true, + }, + }, + }, + on_attach = lspconfig_on_attach, + coq.lsp_ensure_capabilities(), + capabilities = capabilities +}) + +-- Инициализация "hrsh7th/vscode-langservers-extracted" (LSP-сервер для JS, вспомогательный для CSS) lspconfig.cssls.setup({ + settings = { + css = { + validate = true + }, + less = { + validate = true + }, + scss = { + validate = true + } + }, on_attach = lspconfig_on_attach, coq.lsp_ensure_capabilities(), capabilities = capabilities }) --- Инициализация "vscode-langservers-extracted" (LSP-сервер для JavaScript и PostScript) +-- Инициализация "antonk52/cssmodules-language-server" (LSP-сервер для JS, вспомогательный для CSS) +lspconfig.cssmodules_ls.setup({ + init_options = { + camelCase = false, + }, + on_attach = lspconfig_on_attach, + coq.lsp_ensure_capabilities(), + capabilities = capabilities +}) + +-- Инициализация "denoland/deno" (LSP-сервер для JavaScript и PostScript) lspconfig.denols.setup({ + init_options = { + enable = true, + unstable = false + }, on_attach = lspconfig_on_attach, coq.lsp_ensure_capabilities(), capabilities = capabilities }) --- Инициализация "vscode-langservers-extracted" (LSP-сервер для JSON) +-- Инициализация "hrsh7th/vscode-langservers-extracted" (LSP-сервер для JSON) lspconfig.jsonls.setup({ on_attach = lspconfig_on_attach, coq.lsp_ensure_capabilities(), capabilities = capabilities }) + +-- Инициализация "luals/lua-language-server" (LSP-сервер для Lua) +lspconfig.lua_ls.setup({ + 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, + coq.lsp_ensure_capabilities(), + capabilities = capabilities +}) diff --git a/lua/plugins/packer.lua b/lua/plugins/packer.lua index a68f86c..3b9688d 100644 --- a/lua/plugins/packer.lua +++ b/lua/plugins/packer.lua @@ -4,32 +4,32 @@ vim.cmd('packadd packer.nvim') return require('packer').startup(function(use) -- Менеджер плагинов Packer (автообновление) use 'wbthomason/packer.nvim' - + -- Быстрая настройка LSP-серверов use { 'neovim/nvim-lspconfig', - after = 'coq_nvim', + after = 'coq_nvim', config = function() require('plugins/lspconfig') end } - -- Прогресс LSP - use { - 'j-hui/fidget.nvim', - config = function() require('plugins/fidget') end - } + -- Прогресс LSP + use { + 'j-hui/fidget.nvim', + config = function() require('plugins/fidget') end + } - -- Интерфейс отображающий найденные проблемы LSP-серверами - use { - 'folke/trouble.nvim', - requires = 'kyazdani42/nvim-web-devicons', - config = function() require('plugins/trouble') end - } + -- Интерфейс отображающий найденные проблемы LSP-серверами + use { + 'folke/trouble.nvim', + requires = 'kyazdani42/nvim-web-devicons', + config = function() require('plugins/trouble') end + } - -- Пиктограммы для плагинов - use { - 'onsails/lspkind-nvim', - config = function() require('plugins/lspkind') end - } + -- Пиктограммы для плагинов + use { + 'onsails/lspkind-nvim', + config = function() require('plugins/lspkind') end + } -- Пиктограммы для плагинов use { @@ -38,10 +38,10 @@ return require('packer').startup(function(use) } -- Интеграция с GIT - use { - 'lewis6991/gitsigns.nvim', - config = function() require('plugins/gitsigns') end - } + use { + 'lewis6991/gitsigns.nvim', + config = function() require('plugins/gitsigns') end + } -- Обработчик GIT-команд use 'tpope/vim-fugitive' @@ -49,50 +49,50 @@ return require('packer').startup(function(use) -- Отображение изменений GIT use 'mhinz/vim-signify' - -- Отрисовка в реальном времени найденных ошибок LSP-серверами + -- Отрисовка в реальном времени найденных ошибок LSP-серверами use { - 'onsails/diaglist.nvim', - config = function() require('plugins/diaglist') end - } + 'onsails/diaglist.nvim', + config = function() require('plugins/diaglist') end + } - -- Интерфейс строки состояния + -- Интерфейс строки состояния use { - 'nvim-lualine/lualine.nvim', - requires = 'kyazdani42/nvim-web-devicons', - config = function() require('plugins/lualine') end - } - - -- Дополнение для "nvim-lualine/lualine.nvim" с отображением прогресса работы с LSP-серверами + 'nvim-lualine/lualine.nvim', + requires = 'kyazdani42/nvim-web-devicons', + config = function() require('plugins/lualine') end + } + + -- Дополнение для "nvim-lualine/lualine.nvim" с отображением прогресса работы с LSP-серверами use { 'arkav/lualine-lsp-progress', config = function() require('plugins/lualine-lsp-progress') end } - -- Интерфейс строки буфера файлов + -- Интерфейс строки буфера файлов use { - 'akinsho/bufferline.nvim', - tag = "v3.*", + 'akinsho/bufferline.nvim', + tag = "v3.*", requires = 'nvim-tree/nvim-web-devicons', config = function() require('plugins/bufferline') end } - -- Интерфейс древовидной структуры файлов + -- Интерфейс древовидной структуры файлов use { - 'nvim-neo-tree/neo-tree.nvim', - branch = 'v2.x', - requires = { - 'nvim-lua/plenary.nvim', - 'kyazdani42/nvim-web-devicons', - 'MunifTanjim/nui.nvim' - }, - config = function() require('plugins/neo-tree') end - } + 'nvim-neo-tree/neo-tree.nvim', + branch = 'v2.x', + requires = { + 'nvim-lua/plenary.nvim', + 'kyazdani42/nvim-web-devicons', + 'MunifTanjim/nui.nvim' + }, + config = function() require('plugins/neo-tree') end + } - -- Автодополнение скобок и кавычек - use { - 'windwp/nvim-autopairs', - config = function() require('plugins/autopairs') end - } + -- Автодополнение скобок и кавычек + use { + 'windwp/nvim-autopairs', + config = function() require('plugins/autopairs') end + } -- Цвета для отображения найденных ошибок LSP-сервером в случае если другие цвета не найдены use 'folke/lsp-colors.nvim' @@ -136,7 +136,7 @@ return require('packer').startup(function(use) -- Интерфейс для поиска use { - 'nvim-telescope/telescope.nvim', + 'nvim-telescope/telescope.nvim', tag = '0.1.1', config = function() require('plugins/telescope') end } @@ -160,7 +160,7 @@ return require('packer').startup(function(use) -- Интерфейс для отображения тегов в отдельном окне use 'preservim/tagbar' - -- PHP-теги для "preservim/tagbar" (phpctags для ctags) + -- PHP-теги для "preservim/tagbar" (phpctags для ctags) use { 'vim-php/phpctags', run = 'composer install' @@ -177,4 +177,10 @@ return require('packer').startup(function(use) -- Аналог LSP-сервера для подержки синтаксиса nginx use 'chr4/nginx.vim' + + -- Форматировщик Prettier + use { + 'prettier/vim-prettier', + run = 'yarn install --frozen-lockfile --production' + } end) diff --git a/lua/settings/system.lua b/lua/settings/system.lua index fae8cd3..0ced974 100644 --- a/lua/settings/system.lua +++ b/lua/settings/system.lua @@ -19,8 +19,8 @@ vim.opt.signcolumn = 'yes' -- 24-битные цвета vim.opt.termguicolors = true --- Отключение переноса строк при достижении границы окна -vim.opt_local.wrap = false +-- Перенос строк при достижении границы окна +vim.opt_local.wrap = true -- Отображение колонки курсора vim.opt_local.cursorcolumn = true diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua index b137c7c..1867bbc 100644 --- a/plugin/packer_compiled.lua +++ b/plugin/packer_compiled.lua @@ -252,6 +252,11 @@ _G.packer_plugins = { path = "/home/mirzaev/.local/share/nvim/site/pack/packer/start/vim-fugitive", url = "https://github.com/tpope/vim-fugitive" }, + ["vim-prettier"] = { + loaded = true, + path = "/home/mirzaev/.local/share/nvim/site/pack/packer/start/vim-prettier", + url = "https://github.com/prettier/vim-prettier" + }, ["vim-signify"] = { loaded = true, path = "/home/mirzaev/.local/share/nvim/site/pack/packer/start/vim-signify", @@ -266,14 +271,34 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) --- Config for: bufferline.nvim -time([[Config for bufferline.nvim]], true) -try_loadstring("\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins/bufferline\frequire\0", "config", "bufferline.nvim") -time([[Config for bufferline.nvim]], false) --- Config for: symbols-outline.nvim -time([[Config for symbols-outline.nvim]], true) -try_loadstring("\27LJ\2\n7\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\28plugins/symbols-outline\frequire\0", "config", "symbols-outline.nvim") -time([[Config for symbols-outline.nvim]], false) +-- Config for: neo-tree.nvim +time([[Config for neo-tree.nvim]], true) +try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins/neo-tree\frequire\0", "config", "neo-tree.nvim") +time([[Config for neo-tree.nvim]], false) +-- Config for: fidget.nvim +time([[Config for fidget.nvim]], true) +try_loadstring("\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19plugins/fidget\frequire\0", "config", "fidget.nvim") +time([[Config for fidget.nvim]], false) +-- Config for: nvim-treesitter +time([[Config for nvim-treesitter]], true) +try_loadstring("\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins/treesitter\frequire\0", "config", "nvim-treesitter") +time([[Config for nvim-treesitter]], false) +-- Config for: gitsigns.nvim +time([[Config for gitsigns.nvim]], true) +try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins/gitsigns\frequire\0", "config", "gitsigns.nvim") +time([[Config for gitsigns.nvim]], false) +-- Config for: telescope.nvim +time([[Config for telescope.nvim]], true) +try_loadstring("\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins/telescope\frequire\0", "config", "telescope.nvim") +time([[Config for telescope.nvim]], false) +-- Config for: nvim-autopairs +time([[Config for nvim-autopairs]], true) +try_loadstring("\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins/autopairs\frequire\0", "config", "nvim-autopairs") +time([[Config for nvim-autopairs]], false) +-- Config for: vim-test +time([[Config for vim-test]], true) +try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins/vim-test\frequire\0", "config", "vim-test") +time([[Config for vim-test]], false) -- Config for: nvim-dap time([[Config for nvim-dap]], true) try_loadstring("\27LJ\2\n+\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\16plugins/dap\frequire\0", "config", "nvim-dap") @@ -282,66 +307,46 @@ time([[Config for nvim-dap]], false) time([[Config for lspkind-nvim]], true) try_loadstring("\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20plugins/lspkind\frequire\0", "config", "lspkind-nvim") time([[Config for lspkind-nvim]], false) --- Config for: nvim-lint -time([[Config for nvim-lint]], true) -try_loadstring("\27LJ\2\n,\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\17plugins/lint\frequire\0", "config", "nvim-lint") -time([[Config for nvim-lint]], false) --- Config for: trouble.nvim -time([[Config for trouble.nvim]], true) -try_loadstring("\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20plugins/trouble\frequire\0", "config", "trouble.nvim") -time([[Config for trouble.nvim]], false) --- Config for: lualine.nvim -time([[Config for lualine.nvim]], true) -try_loadstring("\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20plugins/lualine\frequire\0", "config", "lualine.nvim") -time([[Config for lualine.nvim]], false) --- Config for: nvim-treesitter -time([[Config for nvim-treesitter]], true) -try_loadstring("\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins/treesitter\frequire\0", "config", "nvim-treesitter") -time([[Config for nvim-treesitter]], false) --- Config for: nvim-web-devicons -time([[Config for nvim-web-devicons]], true) -try_loadstring("\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30plugins/nvim-web-devicons\frequire\0", "config", "nvim-web-devicons") -time([[Config for nvim-web-devicons]], false) --- Config for: telescope.nvim -time([[Config for telescope.nvim]], true) -try_loadstring("\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins/telescope\frequire\0", "config", "telescope.nvim") -time([[Config for telescope.nvim]], false) --- Config for: diaglist.nvim -time([[Config for diaglist.nvim]], true) -try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins/diaglist\frequire\0", "config", "diaglist.nvim") -time([[Config for diaglist.nvim]], false) --- Config for: coq_nvim -time([[Config for coq_nvim]], true) -try_loadstring("\27LJ\2\n+\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\16plugins/coq\frequire\0", "config", "coq_nvim") -time([[Config for coq_nvim]], false) --- Config for: neo-tree.nvim -time([[Config for neo-tree.nvim]], true) -try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins/neo-tree\frequire\0", "config", "neo-tree.nvim") -time([[Config for neo-tree.nvim]], false) --- Config for: vim-test -time([[Config for vim-test]], true) -try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins/vim-test\frequire\0", "config", "vim-test") -time([[Config for vim-test]], false) --- Config for: fidget.nvim -time([[Config for fidget.nvim]], true) -try_loadstring("\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19plugins/fidget\frequire\0", "config", "fidget.nvim") -time([[Config for fidget.nvim]], false) --- Config for: nvim-autopairs -time([[Config for nvim-autopairs]], true) -try_loadstring("\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins/autopairs\frequire\0", "config", "nvim-autopairs") -time([[Config for nvim-autopairs]], false) --- Config for: lush.nvim -time([[Config for lush.nvim]], true) -try_loadstring("\27LJ\2\n,\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\17plugins/lush\frequire\0", "config", "lush.nvim") -time([[Config for lush.nvim]], false) +-- Config for: symbols-outline.nvim +time([[Config for symbols-outline.nvim]], true) +try_loadstring("\27LJ\2\n7\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\28plugins/symbols-outline\frequire\0", "config", "symbols-outline.nvim") +time([[Config for symbols-outline.nvim]], false) -- Config for: lualine-lsp-progress time([[Config for lualine-lsp-progress]], true) try_loadstring("\27LJ\2\n<\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0!plugins/lualine-lsp-progress\frequire\0", "config", "lualine-lsp-progress") time([[Config for lualine-lsp-progress]], false) --- Config for: gitsigns.nvim -time([[Config for gitsigns.nvim]], true) -try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins/gitsigns\frequire\0", "config", "gitsigns.nvim") -time([[Config for gitsigns.nvim]], false) +-- Config for: diaglist.nvim +time([[Config for diaglist.nvim]], true) +try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins/diaglist\frequire\0", "config", "diaglist.nvim") +time([[Config for diaglist.nvim]], false) +-- Config for: lualine.nvim +time([[Config for lualine.nvim]], true) +try_loadstring("\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20plugins/lualine\frequire\0", "config", "lualine.nvim") +time([[Config for lualine.nvim]], false) +-- Config for: lush.nvim +time([[Config for lush.nvim]], true) +try_loadstring("\27LJ\2\n,\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\17plugins/lush\frequire\0", "config", "lush.nvim") +time([[Config for lush.nvim]], false) +-- Config for: coq_nvim +time([[Config for coq_nvim]], true) +try_loadstring("\27LJ\2\n+\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\16plugins/coq\frequire\0", "config", "coq_nvim") +time([[Config for coq_nvim]], false) +-- Config for: nvim-lint +time([[Config for nvim-lint]], true) +try_loadstring("\27LJ\2\n,\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\17plugins/lint\frequire\0", "config", "nvim-lint") +time([[Config for nvim-lint]], false) +-- Config for: nvim-web-devicons +time([[Config for nvim-web-devicons]], true) +try_loadstring("\27LJ\2\n9\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\30plugins/nvim-web-devicons\frequire\0", "config", "nvim-web-devicons") +time([[Config for nvim-web-devicons]], false) +-- Config for: trouble.nvim +time([[Config for trouble.nvim]], true) +try_loadstring("\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20plugins/trouble\frequire\0", "config", "trouble.nvim") +time([[Config for trouble.nvim]], false) +-- Config for: bufferline.nvim +time([[Config for bufferline.nvim]], true) +try_loadstring("\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins/bufferline\frequire\0", "config", "bufferline.nvim") +time([[Config for bufferline.nvim]], false) -- Load plugins in order defined by `after` time([[Sequenced loading]], true) vim.cmd [[ packadd nvim-lspconfig ]]