From 12a4e31da788c3569262a94c0ecda007c8377f35 Mon Sep 17 00:00:00 2001 From: mirzaev Date: Tue, 14 Feb 2023 07:58:56 +1000 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B0=D0=B2=D1=82=D0=BE=D0=B7=D0=B0?= =?UTF-8?q?=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B8=20coq=20+=20=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=B5=D0=BB=D0=BE=D1=87=D0=B5=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/keymaps/system.lua | 21 ++++-- lua/plugins/coq.lua | 6 +- lua/plugins/lspconfig.lua | 4 ++ lua/plugins/lush.lua | 7 ++ lua/plugins/packer.lua | 13 +++- lua/settings/system.lua | 9 +++ nvim | 1 + plugin/packer_compiled.lua | 140 +++++++++++++++++++++---------------- 8 files changed, 127 insertions(+), 74 deletions(-) create mode 100644 lua/plugins/lush.lua create mode 120000 nvim diff --git a/lua/keymaps/system.lua b/lua/keymaps/system.lua index 41cb59d..b6ca12a 100644 --- a/lua/keymaps/system.lua +++ b/lua/keymaps/system.lua @@ -2,11 +2,20 @@ vim.keymap.set('i', '', '', {noremap = true}) -- Быстрый сдвиг текста в режиме 'ВСТАВКА' (insert) -vim.keymap.set('i', '', '>', {noremap = true}) -vim.keymap.set('i', '', '<', {noremap = true}) +-- (надо будет проработать в визуальном режиме на множество строк) +vim.keymap.set({'i', 'v'}, '', '>', {noremap = true}) +vim.keymap.set({'i', 'v'}, '', '<', {noremap = true}) -- Отключение стрелок -vim.keymap.set('n', '', '', {noremap = true}) -vim.keymap.set('n', '', '', {noremap = true}) -vim.keymap.set('n', '', '', {noremap = true}) -vim.keymap.set('n', '', '', {noremap = true}) +vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '', '', {noremap = true}) +vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '', '', {noremap = true}) +vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '', '', {noremap = true}) +vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '', '', {noremap = true}) +vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '', '', {noremap = true}) +vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '', '', {noremap = true}) +vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '', '', {noremap = true}) +vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '', '', {noremap = true}) +vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '', '', {noremap = true}) +vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '', '', {noremap = true}) +vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '', '', {noremap = true}) +vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '', '', {noremap = true}) diff --git a/lua/plugins/coq.lua b/lua/plugins/coq.lua index 07cd115..046d2be 100644 --- a/lua/plugins/coq.lua +++ b/lua/plugins/coq.lua @@ -1,6 +1,4 @@ +-- Настройка "ms-jpq/coq_nvim" vim.g.coq_settings = { - auto_start = 'shut-up', - --keymap = { - -- recommended = false - --} + auto_start = 'shut-up' } diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index ebad0db..9a70c81 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,5 +1,9 @@ +-- Инициализация "ms-jpq/coq_nvim" local coq = require('coq') +-- Инициализация LSP-серверов + +-- Настройка и инициализация "psalm" (LSP-сервер для PHP) require('lspconfig').psalm.setup { on_attach = lspconfig_on_attach, coq.lsp_ensure_capabilities() diff --git a/lua/plugins/lush.lua b/lua/plugins/lush.lua new file mode 100644 index 0000000..d7f0e6d --- /dev/null +++ b/lua/plugins/lush.lua @@ -0,0 +1,7 @@ +-- Инициализация плагина +local lush = require('lush') + +-- Инициализация ссылки на палитру +local hsl = lush.hsl + +-- Тема будет разработана позднее - не до неё сейчас diff --git a/lua/plugins/packer.lua b/lua/plugins/packer.lua index 430861d..a68f86c 100644 --- a/lua/plugins/packer.lua +++ b/lua/plugins/packer.lua @@ -4,10 +4,11 @@ vim.cmd('packadd packer.nvim') return require('packer').startup(function(use) -- Менеджер плагинов Packer (автообновление) use 'wbthomason/packer.nvim' - + -- Быстрая настройка LSP-серверов - use { + use { 'neovim/nvim-lspconfig', + after = 'coq_nvim', config = function() require('plugins/lspconfig') end } @@ -169,5 +170,11 @@ return require('packer').startup(function(use) use 'dag/vim-fish' -- Цветовая тема - use 'rktjmp/lush.nvim'; + use { + 'rktjmp/lush.nvim', + config = function() require('plugins/lush') end + }; + + -- Аналог LSP-сервера для подержки синтаксиса nginx + use 'chr4/nginx.vim' end) diff --git a/lua/settings/system.lua b/lua/settings/system.lua index bba604a..7b5cb64 100644 --- a/lua/settings/system.lua +++ b/lua/settings/system.lua @@ -18,3 +18,12 @@ vim.opt.signcolumn = 'yes' -- 24-битные цвета vim.opt.termguicolors = true + +-- Отключение переноса строк +vim.opt_local.wrap = false + +-- Отображение колонки курсора +vim.opt_local.cursorcolumn = true + +-- Выбор цветовой темы +vim.cmd.colorscheme('default') diff --git a/nvim b/nvim new file mode 120000 index 0000000..47a6cb6 --- /dev/null +++ b/nvim @@ -0,0 +1 @@ +/root/.config/nvim \ No newline at end of file diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua index 6ed3193..8776bf6 100644 --- a/plugin/packer_compiled.lua +++ b/plugin/packer_compiled.lua @@ -91,8 +91,10 @@ _G.packer_plugins = { url = "https://github.com/ms-jpq/coq.thirdparty" }, coq_nvim = { + after = { "nvim-lspconfig" }, config = { "\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" }, loaded = true, + only_config = true, path = "/home/mirzaev/.local/share/nvim/site/pack/packer/start/coq_nvim", url = "https://github.com/ms-jpq/coq_nvim" }, @@ -143,6 +145,7 @@ _G.packer_plugins = { url = "https://github.com/nvim-lualine/lualine.nvim" }, ["lush.nvim"] = { + config = { "\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" }, loaded = true, path = "/home/mirzaev/.local/share/nvim/site/pack/packer/start/lush.nvim", url = "https://github.com/rktjmp/lush.nvim" @@ -153,6 +156,11 @@ _G.packer_plugins = { path = "/home/mirzaev/.local/share/nvim/site/pack/packer/start/neo-tree.nvim", url = "https://github.com/nvim-neo-tree/neo-tree.nvim" }, + ["nginx.vim"] = { + loaded = true, + path = "/home/mirzaev/.local/share/nvim/site/pack/packer/start/nginx.vim", + url = "https://github.com/chr4/nginx.vim" + }, ["nui.nvim"] = { loaded = true, path = "/home/mirzaev/.local/share/nvim/site/pack/packer/start/nui.nvim", @@ -178,8 +186,10 @@ _G.packer_plugins = { }, ["nvim-lspconfig"] = { config = { "\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins/lspconfig\frequire\0" }, + load_after = {}, loaded = true, - path = "/home/mirzaev/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + needs_bufread = false, + path = "/home/mirzaev/.local/share/nvim/site/pack/packer/opt/nvim-lspconfig", url = "https://github.com/neovim/nvim-lspconfig" }, ["nvim-treesitter"] = { @@ -256,30 +266,62 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) --- Config for: nvim-lspconfig -time([[Config for nvim-lspconfig]], 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/lspconfig\frequire\0", "config", "nvim-lspconfig") -time([[Config for nvim-lspconfig]], false) --- Config for: lspkind-nvim -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-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: 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: 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-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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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") @@ -288,50 +330,26 @@ time([[Config for coq_nvim]], false) 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: 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: 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: 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: 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: 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: 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: 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") time([[Config for nvim-dap]], 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: 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: 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: 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: 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: lspkind-nvim +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) +-- Load plugins in order defined by `after` +time([[Sequenced loading]], true) +vim.cmd [[ packadd nvim-lspconfig ]] + +-- Config for: nvim-lspconfig +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/lspconfig\frequire\0", "config", "nvim-lspconfig") + +time([[Sequenced loading]], false) _G._packer.inside_compile = false if _G._packer.needs_bufread == true then