отступы вместо пробелов

This commit is contained in:
Arsen Mirzaev Tatyano-Muradovich 2023-03-21 22:44:09 +10:00
parent ce27dbe7e8
commit 5a6f16bfbd
3 changed files with 200 additions and 192 deletions

View File

@ -181,6 +181,7 @@ return require('packer').startup(function(use)
-- Форматировщик Prettier -- Форматировщик Prettier
use { use {
'prettier/vim-prettier', 'prettier/vim-prettier',
run = 'yarn install --frozen-lockfile --production' run = 'yarn install --frozen-lockfile --production',
config = function() require('plugins/vim-prettier') end
} }
end) end)

View File

@ -1,4 +1,4 @@
require('trouble').setup { require('trouble').setup({
position = "bottom", -- position of the list can be: bottom, top, left, right position = "bottom", -- position of the list can be: bottom, top, left, right
height = 10, -- height of the trouble list when position is top or bottom height = 10, -- height of the trouble list when position is top or bottom
width = 50, -- width of the list when position is left or right width = 50, -- width of the list when position is left or right
@ -8,24 +8,25 @@ require('trouble').setup {
fold_closed = "", -- icon used for closed folds fold_closed = "", -- icon used for closed folds
group = true, -- group results by file group = true, -- group results by file
padding = true, -- add an extra new line on top of the list padding = true, -- add an extra new line on top of the list
action_keys = { -- key mappings for actions in the trouble list action_keys = {
-- key mappings for actions in the trouble list
-- map to {} to remove a mapping, for example: -- map to {} to remove a mapping, for example:
-- close = {}, -- close = {},
close = "q", -- close the list close = "q", -- close the list
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
refresh = "r", -- manually refresh refresh = "r", -- manually refresh
jump = {"<cr>", "<tab>"}, -- jump to the diagnostic or open / close folds jump = { "<cr>", "<tab>" }, -- jump to the diagnostic or open / close folds
open_split = { "<c-x>" }, -- open buffer in new split open_split = { "<c-x>" }, -- open buffer in new split
open_vsplit = { "<c-v>" }, -- open buffer in new vsplit open_vsplit = { "<c-v>" }, -- open buffer in new vsplit
open_tab = { "<c-t>" }, -- open buffer in new tab open_tab = { "<c-t>" }, -- open buffer in new tab
jump_close = {"o"}, -- jump to the diagnostic and close the list jump_close = { "o" }, -- jump to the diagnostic and close the list
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
toggle_preview = "P", -- toggle auto_preview toggle_preview = "P", -- toggle auto_preview
hover = "K", -- opens a small popup with the full multiline message hover = "K", -- opens a small popup with the full multiline message
preview = "p", -- preview the diagnostic location preview = "p", -- preview the diagnostic location
close_folds = {"zM", "zm"}, -- close all folds close_folds = { "zM", "zm" }, -- close all folds
open_folds = {"zR", "zr"}, -- open all folds open_folds = { "zR", "zr" }, -- open all folds
toggle_fold = {"zA", "za"}, -- toggle fold of current file toggle_fold = { "zA", "za" }, -- toggle fold of current file
previous = "k", -- previous item previous = "k", -- previous item
next = "j" -- next item next = "j" -- next item
}, },
@ -34,7 +35,7 @@ require('trouble').setup {
auto_close = false, -- automatically close the list when you have no diagnostics auto_close = false, -- automatically close the list when you have no diagnostics
auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window
auto_fold = false, -- automatically fold a file trouble list at creation auto_fold = false, -- automatically fold a file trouble list at creation
auto_jump = {"lsp_definitions"}, -- for the given modes, automatically jump if there is only a single result auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result
signs = { signs = {
-- icons / text used for a diagnostic -- icons / text used for a diagnostic
error = "", error = "",
@ -44,4 +45,4 @@ require('trouble').setup {
other = "" other = ""
}, },
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
} })

View File

@ -1,11 +1,17 @@
-- Количество пробелов для сдвига -- Количество пробелов для отступа (ширина)
vim.opt.shiftwidth = 2 vim.opt.shiftwidth = 2
-- Количество пробелов при переносе строки (<CR>) -- Количество учитываемых пробелов при операциях редактирования (например: вставка <tab> - отступа)
vim.opt.tabstop = 2 vim.opt.softtabstop = 2
-- Подстраивать новые строки под предыдущий отступ -- Количество пробелов которые будет конвертированы в отступы
vim.opt.tabstop = 4
-- Пробелы вместо отступов
vim.opt.expandtab = false
-- Копировать отступ из текущей строки при создании новой
vim.opt.autoindent = true
-- Умный отступ при создании новой строки
vim.opt.smartindent = true vim.opt.smartindent = true
-- Отступы вместо пробелов
vim.opt.expandtab = true