recovery from stupid file loss and major update
This commit is contained in:
2
lua/plugins/autopairs.lua
Normal file
2
lua/plugins/autopairs.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
require('nvim-autopairs').setup({
|
||||
})
|
0
lua/plugins/coc.lua
Normal file
0
lua/plugins/coc.lua
Normal file
2
lua/plugins/cokeline.lua
Normal file
2
lua/plugins/cokeline.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
require('cokeline').setup({
|
||||
})
|
2
lua/plugins/dap.lua
Normal file
2
lua/plugins/dap.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
require('dap').configurations.cpp = {
|
||||
}
|
7
lua/plugins/diaglist.lua
Normal file
7
lua/plugins/diaglist.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
require('diaglist').init({
|
||||
-- below are defaults
|
||||
debug = false,
|
||||
|
||||
-- increase for noisy servers
|
||||
debounce_ms = 150,
|
||||
})
|
50
lua/plugins/fidget.lua
Normal file
50
lua/plugins/fidget.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
require('fidget').setup({
|
||||
text = {
|
||||
spinner = "pipe", -- animation shown when tasks are ongoing
|
||||
done = "✔", -- character shown when all tasks are complete
|
||||
commenced = "Started", -- message shown when task starts
|
||||
completed = "Completed", -- message shown when task completes
|
||||
},
|
||||
align = {
|
||||
bottom = true, -- align fidgets along bottom edge of buffer
|
||||
right = true, -- align fidgets along right edge of buffer
|
||||
},
|
||||
timer = {
|
||||
spinner_rate = 125, -- frame rate of spinner animation, in ms
|
||||
fidget_decay = 2000, -- how long to keep around empty fidget, in ms
|
||||
task_decay = 1000, -- how long to keep around completed task, in ms
|
||||
},
|
||||
window = {
|
||||
relative = "win", -- where to anchor, either "win" or "editor"
|
||||
blend = 100, -- &winblend for the window
|
||||
zindex = nil, -- the zindex value for the window
|
||||
border = "none", -- style of border for the fidget window
|
||||
},
|
||||
fmt = {
|
||||
leftpad = true, -- right-justify text in fidget box
|
||||
stack_upwards = true, -- list of tasks grows upwards
|
||||
max_width = 0, -- maximum width of the fidget box
|
||||
fidget = -- function to format fidget title
|
||||
function(fidget_name, spinner)
|
||||
return string.format("%s %s", spinner, fidget_name)
|
||||
end,
|
||||
task = -- function to format each task line
|
||||
function(task_name, message, percentage)
|
||||
return string.format(
|
||||
"%s%s [%s]",
|
||||
message,
|
||||
percentage and string.format(" (%s%%)", percentage) or "",
|
||||
task_name
|
||||
)
|
||||
end,
|
||||
},
|
||||
sources = { -- Sources to configure
|
||||
* = { -- Name of source
|
||||
ignore = false, -- Ignore notifications from this source
|
||||
},
|
||||
},
|
||||
debug = {
|
||||
logging = false, -- whether to enable logging, for debugging
|
||||
strict = false, -- whether to interpret LSP strictly
|
||||
}
|
||||
})
|
44
lua/plugins/lspkind.lua
Normal file
44
lua/plugins/lspkind.lua
Normal file
@@ -0,0 +1,44 @@
|
||||
require('lspkind').init({
|
||||
-- defines how annotations are shown
|
||||
-- default: symbol
|
||||
-- options: 'text', 'text_symbol', 'symbol_text', 'symbol'
|
||||
mode = 'symbol_text',
|
||||
|
||||
-- default symbol map
|
||||
-- can be either 'default' (requires nerd-fonts font) or
|
||||
-- 'codicons' for codicon preset (requires vscode-codicons font)
|
||||
--
|
||||
-- default: 'default'
|
||||
preset = 'codicons',
|
||||
|
||||
-- override preset symbols
|
||||
--
|
||||
-- default: {}
|
||||
symbol_map = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "ﰠ",
|
||||
Variable = "",
|
||||
Class = "ﴯ",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "ﰠ",
|
||||
Unit = "塞",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "פּ",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = ""
|
||||
},
|
||||
})
|
0
lua/plugins/lualine-lsp-progress.lua
Normal file
0
lua/plugins/lualine-lsp-progress.lua
Normal file
71
lua/plugins/lualine.lua
Normal file
71
lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,71 @@
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{
|
||||
'mode',
|
||||
icons_enabled = true,
|
||||
icon = nil,
|
||||
separator = nil,
|
||||
cond = nil,
|
||||
color = nil,
|
||||
--type = var(g:coc_status/bo:modifiable),
|
||||
padding = 1,
|
||||
fmt = nil,
|
||||
on_click = nil,
|
||||
}
|
||||
},
|
||||
lualine_b = {
|
||||
'branch',
|
||||
'diff',
|
||||
{
|
||||
'diagnostics',
|
||||
sources = { 'coc' },
|
||||
sections = { 'error', 'warn', 'info', 'hint' },
|
||||
diagnostics_color = {
|
||||
error = 'DiagnosticError',
|
||||
warn = 'DiagnosticWarn',
|
||||
info = 'DiagnosticInfo',
|
||||
hint = 'DiagnosticHint',
|
||||
},
|
||||
symbols = {error = 'E', warn = 'W', info = 'I', hint = 'H'},
|
||||
colored = true,
|
||||
update_in_insert = false,
|
||||
always_visible = false
|
||||
}
|
||||
},
|
||||
lualine_c = {'filename', 'lsp_progress'},
|
||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
}
|
9
lua/plugins/mason.lua
Normal file
9
lua/plugins/mason.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
require('mason').setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
})
|
48
lua/plugins/neo-tree.lua
Normal file
48
lua/plugins/neo-tree.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
local highlights = require("neo-tree.ui.highlights")
|
||||
|
||||
require('neo-tree').setup({
|
||||
filesystem = {
|
||||
components = {
|
||||
--[[
|
||||
icon = function(config, node, state)
|
||||
local icon = config.default or ' '
|
||||
local padding = config.padding or ' '
|
||||
local highlight = config.highlight or highlights.FILE_ICON
|
||||
|
||||
if node.type == 'directory' then
|
||||
highlight = highlights.DIRECTORY_ICON
|
||||
if node:is_expanded() then
|
||||
icon = config.folder_open or '-'
|
||||
else
|
||||
icon = config.folder_closed or '+'
|
||||
end
|
||||
elseif node.type == 'file' then
|
||||
local success, web_devicons = pcall(require, 'nvim-web-devicons')
|
||||
if success then
|
||||
local devicon, hl = web_devicons.get_icon(node.name, node.ext)
|
||||
icon = devicon or icon
|
||||
highlight = hl or highlight
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
text = icon .. padding,
|
||||
highlight = highlight
|
||||
}
|
||||
end
|
||||
},
|
||||
]]
|
||||
window = {
|
||||
mappings = {
|
||||
['o'] = 'system_open'
|
||||
},
|
||||
},
|
||||
commands = {
|
||||
-- Открытие файла через программу по умолчанию в операционной системе
|
||||
system_open = function(state)
|
||||
vim.api.nvim_command(string.format('silent !xdg-open \'%s\'', state.tree:get_node():get_id()))
|
||||
end,
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
10
lua/plugins/null-ls.lua
Normal file
10
lua/plugins/null-ls.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.diagnostics.eslint,
|
||||
null_ls.builtins.completion.spell,
|
||||
null_ls.builtins.code_actions.gitsigns
|
||||
},
|
||||
})
|
129
lua/plugins/packer.lua
Normal file
129
lua/plugins/packer.lua
Normal file
@@ -0,0 +1,129 @@
|
||||
-- Инициализация
|
||||
vim.cmd('packadd packer.nvim')
|
||||
|
||||
return require('packer').startup(function(use)
|
||||
-- Менеджер плагинов Packer (автообновление)
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
-- Быстрая настройка LSP-серверов
|
||||
use 'neovim/nvim-lspconfig'
|
||||
|
||||
-- Прогресс LSP
|
||||
use {
|
||||
'j-hui/fidget.nvim',
|
||||
config = function() require('fidget') end
|
||||
}
|
||||
|
||||
-- Интерфейс отображающий найденные проблемы LSP-серверами
|
||||
use {
|
||||
'folke/trouble.nvim',
|
||||
requires = 'kyazdani42/nvim-web-devicons',
|
||||
config = function() require('trouble') end
|
||||
}
|
||||
|
||||
-- Пиктограммы которые используются плагинами
|
||||
use {
|
||||
'onsails/lspkind-nvim',
|
||||
config = function() require('plugins/lspkind') end
|
||||
}
|
||||
|
||||
-- Интеграция с GIT
|
||||
use {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
config = function() require('gitsigns') end
|
||||
}
|
||||
|
||||
-- Отрисовка в реальном времени найденных ошибок LSP-серверами
|
||||
use {
|
||||
'onsails/diaglist.nvim',
|
||||
config = function() require('diaglist') end
|
||||
}
|
||||
|
||||
-- Интерфейс строки состояния
|
||||
use {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
||||
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 {
|
||||
'noib3/nvim-cokeline',
|
||||
requires = 'kyazdani42/nvim-web-devicons',
|
||||
config = function() require('plugins/cokeline') 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
|
||||
}
|
||||
|
||||
-- Автодополнение скобок и кавычек
|
||||
use {
|
||||
'windwp/nvim-autopairs',
|
||||
config = function() require('plugins/autopairs') end
|
||||
}
|
||||
|
||||
-- Загрузчик расширений
|
||||
use {
|
||||
'neoclide/coc.nvim',
|
||||
branch = 'release',
|
||||
config = function() require('plugins/coc') end
|
||||
}
|
||||
|
||||
-- Цвета для отображения найденных ошибок LSP-сервером в случае если другие цвета не найдены
|
||||
use 'folke/lsp-colors.nvim'
|
||||
|
||||
-- Менеджер пакетов для LSP-серверов, DAP-серверов, линтеров и форматировщиков
|
||||
use {
|
||||
'williamboman/mason.nvim',
|
||||
config = function() require('plugins/mason') end
|
||||
}
|
||||
|
||||
-- Быстрое обновление всех пакетов через "nwilliamboman/mason.nvim"
|
||||
use 'RubixDev/mason-update-all'
|
||||
|
||||
-- Мост между "williamboman/mason.nvim" и "neovim/nvim-lspconfig"
|
||||
use {
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
requires = {
|
||||
'williamboman/mason.nvim',
|
||||
'neovim/nvim-lspconfig'
|
||||
}
|
||||
}
|
||||
|
||||
-- Клиентская реализация DAP
|
||||
use {
|
||||
'mfussenegger/nvim-dap',
|
||||
config = function() require('plugins/dap') end
|
||||
}
|
||||
|
||||
-- Мост между "nwilliamboman/mason.nvim" и "mfussenegger/nvim-dap"
|
||||
use {
|
||||
'jay-babu/mason-nvim-dap.nvim',
|
||||
requires = {
|
||||
'williamboman/mason.nvim',
|
||||
'mfussenegger/nvim-dap'
|
||||
}
|
||||
}
|
||||
|
||||
-- Линтер, форматировщик и прочее
|
||||
use {
|
||||
'jose-elias-alvarez/null-ls.nvim',
|
||||
requires = 'nvim-lua/plenary.nvim',
|
||||
config = function() require('plugins/null-ls') end
|
||||
}
|
||||
end)
|
47
lua/plugins/trouble.lua
Normal file
47
lua/plugins/trouble.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
require('trouble').setup {
|
||||
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
|
||||
width = 50, -- width of the list when position is left or right
|
||||
icons = true, -- use devicons for filenames
|
||||
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
|
||||
fold_open = "", -- icon used for open folds
|
||||
fold_closed = "", -- icon used for closed folds
|
||||
group = true, -- group results by file
|
||||
padding = true, -- add an extra new line on top of the list
|
||||
action_keys = { -- key mappings for actions in the trouble list
|
||||
-- map to {} to remove a mapping, for example:
|
||||
-- close = {},
|
||||
close = "q", -- close the list
|
||||
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
|
||||
refresh = "r", -- manually refresh
|
||||
jump = {"<cr>", "<tab>"}, -- jump to the diagnostic or open / close folds
|
||||
open_split = { "<c-x>" }, -- open buffer in new split
|
||||
open_vsplit = { "<c-v>" }, -- open buffer in new vsplit
|
||||
open_tab = { "<c-t>" }, -- open buffer in new tab
|
||||
jump_close = {"o"}, -- jump to the diagnostic and close the list
|
||||
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
|
||||
toggle_preview = "P", -- toggle auto_preview
|
||||
hover = "K", -- opens a small popup with the full multiline message
|
||||
preview = "p", -- preview the diagnostic location
|
||||
close_folds = {"zM", "zm"}, -- close all folds
|
||||
open_folds = {"zR", "zr"}, -- open all folds
|
||||
toggle_fold = {"zA", "za"}, -- toggle fold of current file
|
||||
previous = "k", -- previous item
|
||||
next = "j" -- next item
|
||||
},
|
||||
indent_lines = true, -- add an indent guide below the fold icons
|
||||
auto_open = false, -- automatically open the list when you have 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_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
|
||||
signs = {
|
||||
-- icons / text used for a diagnostic
|
||||
error = "",
|
||||
warning = "",
|
||||
hint = "",
|
||||
information = "",
|
||||
other = ""
|
||||
},
|
||||
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
|
||||
}
|
Reference in New Issue
Block a user