even cooler
This commit is contained in:
@@ -2,8 +2,13 @@
|
||||
return {
|
||||
'akinsho/bufferline.nvim',
|
||||
enabled = true,
|
||||
lazy = false,
|
||||
priority = 40,
|
||||
lazy = true,
|
||||
event = 'BufReadPre',
|
||||
keys = {
|
||||
{ '<tab>', '<cmd>BufferLineCycleNext<cr>', mode = { 'n' }, desc = 'Move to the next tab', noremap = true, silent = true },
|
||||
{ '<s-tab>', '<cmd>BufferLineCyclePrev<cr>', mode = { 'n' }, desc = 'Move to the previous tab', noremap = true, silent = true },
|
||||
{ '<leader><tab>', '<cmd>lua require("bufferline").go_to(vim.fn.input("Enter tab number: "), true)<cr>', mode = { 'n' }, desc = 'Move to the tab', noremap = true, silent = true },
|
||||
},
|
||||
version = '*',
|
||||
dependencies = {
|
||||
--
|
||||
@@ -12,7 +17,7 @@ return {
|
||||
opts = {
|
||||
options = {
|
||||
themable = true,
|
||||
numbers = 'buffer_id',
|
||||
numbers = 'ordinal',
|
||||
-- close_command = 'bdelete! %d',
|
||||
-- right_mouse_command = 'bdelete! %d',
|
||||
-- left_mouse_command = 'buffer %d',
|
||||
@@ -44,7 +49,7 @@ return {
|
||||
persist_buffer_sort = true,
|
||||
move_wraps_at_ends = false,
|
||||
-- separator_style = 'slant' | 'slope' | 'thick' | 'thin' | { 'any', 'any' },
|
||||
separator_style = 'thin',
|
||||
separator_style = 'default',
|
||||
enforce_regular_tabs = false,
|
||||
always_show_bufferline = true,
|
||||
auto_toggle_bufferline = true,
|
||||
|
||||
@@ -3,6 +3,7 @@ return {
|
||||
'ms-jpq/coq_nvim',
|
||||
enabled = true,
|
||||
lazy = false,
|
||||
priority = 30,
|
||||
branch = 'coq',
|
||||
dependencies = {
|
||||
-- Quickstart configs for Nvim LSP
|
||||
@@ -20,30 +21,3 @@ return {
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
||||
--
|
||||
--[[ {
|
||||
'neovim/nvim-lspconfig',
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
-- Fast as FUCK nvim completion
|
||||
{ 'ms-jpq/coq_nvim', branch = 'coq' },
|
||||
|
||||
-- 9000+ Snippets
|
||||
{ 'ms-jpq/coq.artifacts', branch = 'artifacts' },
|
||||
|
||||
-- Lua & third party sources. Need to **configure separately**
|
||||
{ 'ms-jpq/coq.thirdparty', branch = '3p' }
|
||||
},
|
||||
|
||||
init = function()
|
||||
vim.g.coq_settings = {
|
||||
auto_start = 'shut-up',
|
||||
-- Your COQ settings here
|
||||
}
|
||||
end,
|
||||
|
||||
config = function()
|
||||
-- Your LSP settings here
|
||||
end,
|
||||
} ]]
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
-- Live render workspace diagnostics in quickfix with
|
||||
-- current buf errors on top, buffer diagnostics in loclist
|
||||
-- @todo удалить и заменить на трабл
|
||||
return {
|
||||
'onsails/diaglist.nvim',
|
||||
enabled = true,
|
||||
enabled = false,
|
||||
lazy = true,
|
||||
keys = {
|
||||
{ '<leader><f3>', '<cmd>lua require(\'diaglist\').open_all_diagnostics()<cr>', mode = { 'n', 'i', 'v', 't' }, desc = 'Open all diagnostics (diaglist)', noremap = true, silent = true },
|
||||
},
|
||||
opts = {
|
||||
debug = false,
|
||||
debounce_ms = 150
|
||||
|
||||
@@ -2,5 +2,13 @@
|
||||
return {
|
||||
'b3nj5m1n/kommentary',
|
||||
enabled = true,
|
||||
lazy = true
|
||||
lazy = true,
|
||||
keys = {
|
||||
{ 'gcc', '<Plug>kommentary_line_default', mode = 'n', desc = 'Comment', noremap = true, silent = true },
|
||||
{ 'gc', '<Plug>kommentary_motion_default', mode = 'n', desc = 'Comment', noremap = true, silent = true },
|
||||
{ 'gc', '<Plug>kommentary_visual_default<C-c>', mode = 'v', desc = 'Comment', noremap = true, silent = true },
|
||||
},
|
||||
config = function()
|
||||
vim.g.kommentary_create_default_mappings = false
|
||||
end
|
||||
}
|
||||
|
||||
@@ -134,7 +134,9 @@ vim.lsp.config(
|
||||
vim.lsp.enable('jsonls')
|
||||
|
||||
-- Инициализация 'luals/lua-language-server' (LSP-сервер для Lua)
|
||||
--[[ vim.lsp.config.lua_ls.setup({
|
||||
vim.lsp.config(
|
||||
'lua_ls',
|
||||
{
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
@@ -158,6 +160,8 @@ vim.lsp.enable('jsonls')
|
||||
on_attach = lspconfig_on_attach,
|
||||
coq.lsp_ensure_capabilities(),
|
||||
capabilities = capabilities
|
||||
})]]
|
||||
}
|
||||
)
|
||||
vim.lsp.enable('lua_ls')
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -61,25 +61,7 @@ return {
|
||||
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_b = {'branch', 'diff'},
|
||||
lualine_c = {'filename', 'lsp_progress'},
|
||||
lualine_x = { FugitiveStatusline, 'encoding', 'fileformat', 'filetype'},
|
||||
-- lualine_x = { FugitiveHead, 'encoding', 'fileformat', 'filetype'},
|
||||
@@ -101,5 +83,23 @@ return {
|
||||
'lazy',
|
||||
'nvim-dap-ui',
|
||||
'trouble',
|
||||
'neo-tree'}
|
||||
'neo-tree'
|
||||
},
|
||||
-- config = function()
|
||||
-- local trouble = require("trouble")
|
||||
-- local symbols = trouble.statusline({
|
||||
-- mode = "lsp_document_symbols",
|
||||
-- groups = {},
|
||||
-- title = false,
|
||||
-- filter = { range = true },
|
||||
-- format = "{kind_icon}{symbol.name:Normal}",
|
||||
-- -- The following line is needed to fix the background color
|
||||
-- -- Set it to the lualine section you want to use
|
||||
-- hl_group = "lualine_c_normal",
|
||||
-- })
|
||||
-- table.insert(opts.sections.lualine_c, {
|
||||
-- symbols.get,
|
||||
-- cond = symbols.has,
|
||||
-- })
|
||||
-- end
|
||||
}
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
return {
|
||||
'nvim-neo-tree/neo-tree.nvim',
|
||||
enabled = true,
|
||||
lazy = false,
|
||||
priority = 60,
|
||||
lazy = true,
|
||||
keys = {
|
||||
{ '<f1>', '<cmd>Neotree toggle<cr>', mode = { 'n', 'i', 'v', 't' }, desc = 'NeoTree toggle', noremap = true, silent = true },
|
||||
},
|
||||
branch = 'v3.x',
|
||||
dependencies = {
|
||||
-- Lua functions
|
||||
|
||||
@@ -4,7 +4,5 @@ return {
|
||||
'tummetott/reticle.nvim',
|
||||
enabled = true,
|
||||
lazy = true,
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
},
|
||||
event = 'VeryLazy'
|
||||
}
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
return {
|
||||
'preservim/tagbar',
|
||||
enabled = true,
|
||||
lazy = false,
|
||||
priority = 40,
|
||||
lazy = true,
|
||||
keys = {
|
||||
{ '<f2>', '<cmd>TagbarToggle<cr>', mode = { 'n', 'i', 'v', 't' }, desc = 'Tagbar toggle', noremap = true, silent = true },
|
||||
},
|
||||
dependencies = {
|
||||
-- An enhanced ctags compatible index generator written in pure PHP
|
||||
{ 'vim-php/phpctags' },
|
||||
|
||||
@@ -4,7 +4,12 @@ return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
enabled = true,
|
||||
lazy = true,
|
||||
tag = 'v0.2.0',
|
||||
keys = {
|
||||
{ '<c-f>', '<cmd>Telescope find_files', mode = { 'n', 'i', 'v', 't' }, desc = 'Telescope find', noremap = true, silent = true },
|
||||
{ '<c-F>', '<cmd>Telescope live_grep', mode = { 'n', 'i', 'v', 't' }, desc = 'Telescope grep', noremap = true, silent = true },
|
||||
{ '<leader><s-tab>', '<cmd>Telescope buffers', mode = { 'n', 'i', 'v', 't' }, desc = 'Telescope buffers', noremap = true, silent = true },
|
||||
{ '<leader>?', '<cmd>Telescope help_tags', mode = { 'n', 'i', 'v', 't' }, desc = 'Telescope help', noremap = true, silent = true },
|
||||
},
|
||||
dependencies = {
|
||||
-- Functions for Telescope
|
||||
{ 'nvim-lua/plenary.nvim' },
|
||||
@@ -13,7 +18,7 @@ return {
|
||||
{ 'nvim-telescope/telescope-dap.nvim' }
|
||||
},
|
||||
opts = {
|
||||
exteinsiions = {
|
||||
exteinsions = {
|
||||
dap = {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4,112 +4,11 @@
|
||||
return {
|
||||
'folke/trouble.nvim',
|
||||
enabled = true,
|
||||
lazy = false,
|
||||
priority = 20,
|
||||
dependencies = {
|
||||
-- Nvim Treesitter configurations and abstraction layer
|
||||
{ 'nvim-treesitter/nvim-treesitter' },
|
||||
|
||||
-- Provides Nerd Font icons (glyphs) for use by neovim plugins
|
||||
{ 'nvim-tree/nvim-web-devicons' }
|
||||
},
|
||||
opts = {
|
||||
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
|
||||
},
|
||||
config = function()
|
||||
-- Initializing Telescope
|
||||
local telescope = require('telescope')
|
||||
local telescope_actions = require('telescope.actions')
|
||||
local telescope_open = require('trouble.sources.telescope').open
|
||||
|
||||
-- Use this to add more results without clearing the trouble list
|
||||
local add_to_trouble = require('trouble.sources.telescope').add
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = { ['<c-t>'] = telescope_open },
|
||||
n = { ['<c-t>'] = telescope_open },
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
lazy = true,
|
||||
cmd = 'Trouble',
|
||||
keys = {
|
||||
{
|
||||
'<leader>xx',
|
||||
'<cmd>Trouble diagnostics toggle<cr>',
|
||||
desc = 'Diagnostics (Trouble)',
|
||||
},
|
||||
{
|
||||
'<leader>xX',
|
||||
'<cmd>Trouble diagnostics toggle filter.buf=0<cr>',
|
||||
desc = 'Buffer Diagnostics (Trouble)',
|
||||
},
|
||||
{
|
||||
'<leader>cs',
|
||||
'<cmd>Trouble symbols toggle focus=false<cr>',
|
||||
desc = 'Symbols (Trouble)',
|
||||
},
|
||||
{
|
||||
'<leader>cl',
|
||||
'<cmd>Trouble lsp toggle focus=false win.position=right<cr>',
|
||||
desc = 'LSP Definitions / references / ... (Trouble)',
|
||||
},
|
||||
{
|
||||
'<leader>xL',
|
||||
'<cmd>Trouble loclist toggle<cr>',
|
||||
desc = 'Location List (Trouble)',
|
||||
},
|
||||
{
|
||||
'<leader>xQ',
|
||||
'<cmd>Trouble qflist toggle<cr>',
|
||||
desc = 'Quickfix List (Trouble)',
|
||||
},
|
||||
}
|
||||
keys = {
|
||||
{ '<f3>', '<cmd>Trouble diagnostics toggle<cr>', mode = { 'n', 'i', 'v', 't' }, desc = 'Diagnostics (Trouble)', noremap = true, silent = true },
|
||||
},
|
||||
opts = {},
|
||||
config = function() end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user