Поддержка ru_RU

This commit is contained in:
Arsen Mirzaev Tatyano-Muradovich 2023-02-14 19:40:45 +10:00
parent c3efd798aa
commit 967952b41b
6 changed files with 101 additions and 71 deletions

View File

@ -1,11 +1,11 @@
--[[ nvim-neo-tree/neo-tree ]] --[[ nvim-neo-tree/neo-tree ]]
-- Открыть интерфейс с древовидным отображением файлов -- Открыть интерфейс с древовидным отображением файлов
vim.keymap.set({'n', 'i', 'v', 'o', 'x'}, '<f1>', '<cmd>NeoTreeRevealToggle<cr>', {noremap = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<f1>', '<cmd>NeoTreeRevealToggle<cr>', {noremap = true})
-- [[ folke/trouble.nvim ]] -- [[ folke/trouble.nvim ]]
vim.keymap.set({'n', 'i', 'v', 'o', 'x'}, '<f2>', '<cmd>TroubleToggle<cr>', {noremap = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<f2>', '<cmd>TroubleToggle<cr>', {noremap = true})
--[[ onsails/diaglist.nvim ]] --[[ onsails/diaglist.nvim ]]
@ -147,9 +147,8 @@ vim.keymap.set('x', '<leader>cd', '<Plug>kommentary_visual_decrease', {noremap =
--[[ preservim/tagbar ]] --[[ preservim/tagbar ]]
vim.keymap.set({'n', 'i', 'v', 'o', 'x'}, '<f8>', '<cmd>TagbarToggle<cr>', {noremap = true, silent = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<f8>', '<cmd>TagbarToggle<cr>', {noremap = true, silent = true})
--[[ simrat39/symbols-outline.nvim ]] --[[ simrat39/symbols-outline.nvim ]]
vim.keymap.set({'n', 'i', 'v', 'o', 'x'}, '<f7>', '<cmd>SymbolsOutline<cr>', {noremap = true, silent = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<f7>', '<cmd>SymbolsOutline<cr>', {noremap = true, silent = true})

View File

@ -1,21 +1,24 @@
-- Выход из режима "ВСТАВКА" (insert) -- Выход из режима "ВСТАВКА" (insert)
vim.keymap.set('i', '<C-i>', '<escape>', {noremap = true}) vim.keymap.set('i', '<C-i>', '<escape>', {noremap = true, silent = true})
-- Быстрый сдвиг текста в режиме 'ВСТАВКА' (insert) -- Быстрый сдвиг текста в режиме 'ВСТАВКА' (insert)
-- (надо будет проработать в визуальном режиме на множество строк) -- (надо будет проработать в визуальном режиме на множество строк)
vim.keymap.set({'i', 'v'}, '<tab>', '<cmd>><cr>', {noremap = true}) vim.keymap.set({'i', 'v', 't'}, '<tab>', '<cmd>><cr>', {noremap = true, silent = true})
vim.keymap.set({'i', 'v'}, '<s-tab>', '<cmd><<cr>', {noremap = true}) vim.keymap.set({'i', 'v', 't'}, '<s-tab>', '<cmd><<cr>', {noremap = true, silent = true})
-- Отключение стрелок -- Отключение стрелок
vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '<left>', '', {noremap = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<left>', '', {noremap = true, silent = true})
vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '<up>', '', {noremap = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<up>', '', {noremap = true, silent = true})
vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '<right>', '', {noremap = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<right>', '', {noremap = true, silent = true})
vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '<down>', '', {noremap = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<down>', '', {noremap = true, silent = true})
vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '<s-left>', '', {noremap = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<s-left>', '', {noremap = true, silent = true})
vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '<s-up>', '', {noremap = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<s-up>', '', {noremap = true, silent = true})
vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '<s-right>', '', {noremap = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<s-right>', '', {noremap = true, silent = true})
vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '<s-down>', '', {noremap = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<s-down>', '', {noremap = true, silent = true})
vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '<c-left>', '', {noremap = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<c-left>', '', {noremap = true, silent = true})
vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '<c-up>', '', {noremap = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<c-up>', '', {noremap = true, silent = true})
vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '<c-right>', '', {noremap = true}) vim.keymap.set({'n', 'i', 'v', 't'}, '<c-right>', '', {noremap = true, silent = true})
vim.keymap.set({'n', 'i', 'x', 'o', 'v'}, '<c-down>', '', {noremap = true}) 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})

View File

@ -1,3 +1,6 @@
-- Инициализация "neovim/nvim-lspconfig"
local lspconfig = require('lspconfig')
-- Активация вещания готовых набросков -- Активация вещания готовых набросков
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true capabilities.textDocument.completion.completionItem.snippetSupport = true
@ -8,12 +11,27 @@ local coq = require('coq')
-- Инициализация LSP-серверов -- Инициализация LSP-серверов
-- Инициализация "psalm" (LSP-сервер для PHP) -- Инициализация "psalm" (LSP-сервер для PHP)
require('lspconfig').psalm.setup { lspconfig.psalm.setup {
on_attach = lspconfig_on_attach, on_attach = lspconfig_on_attach,
coq.lsp_ensure_capabilities() coq.lsp_ensure_capabilities()
} }
-- Инициализация "vscode-html-language-server" (готовый набросок для HTML) -- Инициализация "vscode-html-language-server" (готовый набросок для HTML)
require('lspconfig').html.setup { lspconfig.html.setup {
on_attach = lspconfig_on_attach,
capabilities = capabilities capabilities = capabilities
} }
-- Инициализация "vscode-langservers-extracted" (готовый набросок для JavaScript и PostScript)
lspconfig.eslint.setup({
on_attach = function(client, bufnr)
-- Инициализация команды "EslintFixAll"
vim.api.nvim_create_autocmd("BufWritePre", {
buffer = bufnr,
command = "EslintFixAll",
})
-- Вызов глобальной функции
lspconfig_on_attach(client, bufnr)
end,
})

View File

@ -27,3 +27,14 @@ vim.opt_local.cursorcolumn = true
-- Выбор цветовой темы -- Выбор цветовой темы
vim.cmd.colorscheme('default') vim.cmd.colorscheme('default')
-- Добавление ru_RU (переключать через <c-^>)
vim.opt.keymap = 'russian-jcukenwin'
-- Переключать раскладку на en_US при поиске и вставке
vim.opt.iminsert = 0
vim.opt.imsearch = 0
-- Поддержка буквы "ё"
vim.opt_local.spell = true
vim.opt_local.spelllang = 'ru_yo,en_us'

1
nvim
View File

@ -1 +0,0 @@
/root/.config/nvim

View File

@ -266,26 +266,30 @@ _G.packer_plugins = {
} }
time([[Defining packer_plugins]], false) time([[Defining packer_plugins]], 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 -- Config for: bufferline.nvim
time([[Config for bufferline.nvim]], true) 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") 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) time([[Config for bufferline.nvim]], false)
-- Config for: lualine-lsp-progress -- Config for: nvim-dap
time([[Config for lualine-lsp-progress]], true) 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!plugins/lualine-lsp-progress\frequire\0", "config", "lualine-lsp-progress") 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 lualine-lsp-progress]], false) time([[Config for nvim-dap]], 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-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: lualine.nvim -- Config for: lualine.nvim
time([[Config for lualine.nvim]], true) 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") 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")
@ -294,18 +298,6 @@ time([[Config for lualine.nvim]], false)
time([[Config for nvim-treesitter]], true) 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") 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) 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 -- Config for: diaglist.nvim
time([[Config for diaglist.nvim]], true) 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") 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")
@ -314,34 +306,42 @@ time([[Config for diaglist.nvim]], false)
time([[Config for fidget.nvim]], true) 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") 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) time([[Config for fidget.nvim]], false)
-- Config for: gitsigns.nvim -- Config for: telescope.nvim
time([[Config for gitsigns.nvim]], true) time([[Config for telescope.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") 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 gitsigns.nvim]], false) 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: 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 -- Config for: neo-tree.nvim
time([[Config for neo-tree.nvim]], true) 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") 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) time([[Config for neo-tree.nvim]], false)
-- Config for: nvim-dap -- Config for: vim-test
time([[Config for nvim-dap]], true) time([[Config for vim-test]], 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") 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 nvim-dap]], false) time([[Config for vim-test]], 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: 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: symbols-outline.nvim -- Config for: symbols-outline.nvim
time([[Config for symbols-outline.nvim]], true) 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") 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) time([[Config for symbols-outline.nvim]], false)
-- Config for: lspkind-nvim -- Config for: nvim-autopairs
time([[Config for lspkind-nvim]], true) time([[Config for nvim-autopairs]], 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") 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 lspkind-nvim]], false) time([[Config for nvim-autopairs]], 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: 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)
-- Load plugins in order defined by `after` -- Load plugins in order defined by `after`
time([[Sequenced loading]], true) time([[Sequenced loading]], true)
vim.cmd [[ packadd nvim-lspconfig ]] vim.cmd [[ packadd nvim-lspconfig ]]