nvim: refactor
This commit is contained in:
parent
2fd61a090a
commit
e3685c070a
16 changed files with 174 additions and 131 deletions
|
@ -1,3 +0,0 @@
|
||||||
nnoremap <buffer> q :q<Cr>
|
|
||||||
setlocal nonumber
|
|
||||||
setlocal signcolumn=auto
|
|
|
@ -1,3 +0,0 @@
|
||||||
nnoremap <buffer> q :q<CR>
|
|
||||||
setlocal nonumber
|
|
||||||
setlocal signcolumn=auto
|
|
|
@ -1,3 +0,0 @@
|
||||||
nnoremap <buffer> q :q<CR>
|
|
||||||
setlocal nonumber
|
|
||||||
setlocal signcolumn=auto
|
|
|
@ -107,6 +107,7 @@ end
|
||||||
---|'warn'
|
---|'warn'
|
||||||
---|'info'
|
---|'info'
|
||||||
---|'hint'
|
---|'hint'
|
||||||
|
---|'NONE'
|
||||||
--}}}
|
--}}}
|
||||||
-- style type {{{
|
-- style type {{{
|
||||||
--- @alias style
|
--- @alias style
|
||||||
|
@ -122,7 +123,6 @@ end
|
||||||
---|'italic'
|
---|'italic'
|
||||||
---|'standout'
|
---|'standout'
|
||||||
---|'nocombine'
|
---|'nocombine'
|
||||||
NONE
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
---@param fg ?color
|
---@param fg ?color
|
||||||
|
|
|
@ -9,7 +9,12 @@ function M.setup()
|
||||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to next diagnostic' })
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to next diagnostic' })
|
||||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to prev diagnostic' })
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to prev diagnostic' })
|
||||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, { desc = 'Diagnostic to loclist' })
|
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, { desc = 'Diagnostic to loclist' })
|
||||||
|
vim.keymap.set('n', 'n', "'Nn'[v:searchforward]", { expr = true, desc = 'Next search result' })
|
||||||
|
vim.keymap.set('x', 'n', "'Nn'[v:searchforward]", { expr = true, desc = 'Next search result' })
|
||||||
|
vim.keymap.set('o', 'n', "'Nn'[v:searchforward]", { expr = true, desc = 'Next search result' })
|
||||||
|
vim.keymap.set('n', 'N', "'nN'[v:searchforward]", { expr = true, desc = 'Prev search result' })
|
||||||
|
vim.keymap.set('x', 'N', "'nN'[v:searchforward]", { expr = true, desc = 'Prev search result' })
|
||||||
|
vim.keymap.set('o', 'N', "'nN'[v:searchforward]", { expr = true, desc = 'Prev search result' })
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
vim.o.guifont = 'Noto Sans Mono:14h'
|
|
||||||
|
|
||||||
if not vim.g.neoray then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.cmd.NeoraySet('CursorAnimTime', 0)
|
|
||||||
vim.cmd.NeoraySet('Transparency', '0.95')
|
|
||||||
vim.cmd.NeoraySet('TargetTPS', 120)
|
|
||||||
vim.cmd.NeoraySet('ContextMenuOn', false)
|
|
||||||
vim.cmd.NeoraySet('BoxDrawingOn', true)
|
|
||||||
vim.cmd.NeoraySet('WindowSize', '100x40')
|
|
||||||
vim.cmd.NeoraySet('WindowState', 'none')
|
|
||||||
vim.cmd.NeoraySet('KeyZoomIn', '<>')
|
|
||||||
vim.cmd.NeoraySet('KeyZoomOut', '<>')
|
|
|
@ -1,18 +0,0 @@
|
||||||
require('noice').setup({
|
|
||||||
lsp = {
|
|
||||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
|
||||||
override = {
|
|
||||||
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
|
|
||||||
['vim.lsp.util.stylize_markdown'] = true,
|
|
||||||
['cmp.entry.get_documentation'] = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- you can enable a preset for easier configuration
|
|
||||||
presets = {
|
|
||||||
bottom_search = true, -- use a classic bottom cmdline for search
|
|
||||||
command_palette = false, -- position the cmdline and popupmenu together
|
|
||||||
long_message_to_split = true, -- long messages will be sent to a split
|
|
||||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
|
||||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
|
||||||
},
|
|
||||||
})
|
|
|
@ -30,7 +30,7 @@ function M.setup()
|
||||||
vim.o.shiftwidth = 4
|
vim.o.shiftwidth = 4
|
||||||
vim.o.showcmd = true
|
vim.o.showcmd = true
|
||||||
vim.o.sidescrolloff = 5
|
vim.o.sidescrolloff = 5
|
||||||
vim.o.signcolumn = 'auto'
|
vim.o.signcolumn = 'yes'
|
||||||
vim.o.smartcase = true
|
vim.o.smartcase = true
|
||||||
vim.o.smartindent = true
|
vim.o.smartindent = true
|
||||||
vim.o.softtabstop = 4
|
vim.o.softtabstop = 4
|
||||||
|
@ -40,25 +40,73 @@ function M.setup()
|
||||||
vim.o.splitbelow = true
|
vim.o.splitbelow = true
|
||||||
vim.o.splitright = true
|
vim.o.splitright = true
|
||||||
--vim.o.clipboard = "unnamedplus"
|
--vim.o.clipboard = "unnamedplus"
|
||||||
|
vim.o.guifont = 'Hack:12h'
|
||||||
|
|
||||||
|
|
||||||
|
vim.o.list = true
|
||||||
|
vim.o.listchars = 'tab:❮⋯❯,trail:⸬,nbsp:·'
|
||||||
|
|
||||||
vim.o.grepprg = 'rg --vimgrep --no-ignore --smart-case $*'
|
vim.o.grepprg = 'rg --vimgrep --no-ignore --smart-case $*'
|
||||||
vim.o.grepformat = '%f:%l:%c:%m'
|
vim.o.grepformat = '%f:%l:%c:%m'
|
||||||
|
|
||||||
vim.o.statusline =
|
vim.o.statusline = ''
|
||||||
'%{fnamemodify(getcwd(),":t")} ' -- basename of cwd
|
.. ' %{fnamemodify(getcwd(),":t")}' -- basename of cwd
|
||||||
.. '%(%{get(b:,"gitsigns_head","")} %)' -- branch
|
.. '%( │ %{get(b:,"gitsigns_head","")}%)' -- branch
|
||||||
.. '%<%f%( [%M%R%W]%)' -- filename and modification flags
|
.. ' │ %<%f%( [%M%R%W]%)' -- filename and modification flags
|
||||||
.. '%=' -- rest is right
|
.. '%=' -- rest is right
|
||||||
.. '%y ' -- filetype
|
.. '%y ' -- filetype
|
||||||
.. '%-7.(%3.l:%-3.(%c%V%)%) %P' -- ruler
|
.. '%-7.(%3.l:%-3.(%c%V%)%) %P' -- ruler
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
pattern = 'neo-tree',
|
pattern = { 'qf', 'man', 'help' },
|
||||||
callback = function ()
|
callback = function(args)
|
||||||
vim.wo.statusline = '%{getcwd()}'
|
local buf = args.buf
|
||||||
|
local bo = vim.bo[buf]
|
||||||
|
if bo.filetype == 'help' and bo.buftype ~= 'help' then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
vim.bo[buf].buflisted = false
|
||||||
|
vim.wo.number = false
|
||||||
|
vim.wo.signcolumn = 'auto'
|
||||||
|
vim.keymap.set('n', 'q', '<Cmd>:q<CR>', { buffer = buf })
|
||||||
|
|
||||||
|
if vim.bo[buf].filetype ~= 'qf' then
|
||||||
|
vim.wo.statusline = '%Y %f%=%l:%v %P'
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' }, {
|
||||||
|
pattern = { 'Trouble' },
|
||||||
|
callback = function(args)
|
||||||
|
local opts = require('trouble.config').options
|
||||||
|
local words = vim.split(opts.mode, '[%W]', {})
|
||||||
|
for i, word in ipairs(words) do
|
||||||
|
words[i] = word:sub(1, 1):upper() .. word:sub(2)
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.b[args.buf].trouble_mode = table.concat(words, ' ')
|
||||||
|
|
||||||
|
vim.wo.statusline = '%Y [%{b:trouble_mode}]%=%P'
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
if vim.g.neoray then
|
||||||
|
vim.cmd.NeoraySet('CursorAnimTime', 0)
|
||||||
|
vim.cmd.NeoraySet('Transparency', '0.95')
|
||||||
|
vim.cmd.NeoraySet('TargetTPS', 120)
|
||||||
|
vim.cmd.NeoraySet('ContextMenuOn', false)
|
||||||
|
vim.cmd.NeoraySet('BoxDrawingOn', true)
|
||||||
|
vim.cmd.NeoraySet('WindowSize', '100x40')
|
||||||
|
vim.cmd.NeoraySet('WindowState', 'none')
|
||||||
|
vim.cmd.NeoraySet('KeyZoomIn', '<>')
|
||||||
|
vim.cmd.NeoraySet('KeyZoomOut', '<>')
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -236,6 +236,7 @@ function M.config()
|
||||||
link('CmpItemAbbrMatch', 'GruvboxAquaBold')
|
link('CmpItemAbbrMatch', 'GruvboxAquaBold')
|
||||||
link('CmpItemAbbrMatchFuzzy', 'GruvboxAquaBold')
|
link('CmpItemAbbrMatchFuzzy', 'GruvboxAquaBold')
|
||||||
|
|
||||||
|
link('WhiteSpace', 'GruvboxBg3') -- make it more bright
|
||||||
|
|
||||||
gr:hl('LineNr', 'gray', 'dark0_hard', { 'underdotted' })
|
gr:hl('LineNr', 'gray', 'dark0_hard', { 'underdotted' })
|
||||||
gr:hl('LspCodeLens', 'gray', nil, { 'italic' })
|
gr:hl('LspCodeLens', 'gray', nil, { 'italic' })
|
||||||
|
|
|
@ -1,21 +1,3 @@
|
||||||
local M = {
|
|
||||||
'neovim/nvim-lspconfig',
|
|
||||||
dependencies = {
|
|
||||||
'folke/neodev.nvim',
|
|
||||||
'b0o/schemastore.nvim',
|
|
||||||
'SmiteshP/nvim-navic',
|
|
||||||
{ 'j-hui/fidget.nvim', config = true },
|
|
||||||
{ 'ray-x/lsp_signature.nvim', opts = { hint_prefix = '⥊ ', floating_window = false, hint_scheme = 'Identifier' } },
|
|
||||||
'hrsh7th/nvim-cmp',
|
|
||||||
'Hoffs/omnisharp-extended-lsp.nvim',
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ '<Space>li', '<Cmd>LspInfo<CR>', desc = 'Lsp info' },
|
|
||||||
{ '<Space>ll', '<Cmd>LspLog<CR>', desc = 'Lsp log' },
|
|
||||||
},
|
|
||||||
lazy = false
|
|
||||||
}
|
|
||||||
|
|
||||||
local function formatting_filter(c)
|
local function formatting_filter(c)
|
||||||
local bl = {
|
local bl = {
|
||||||
'phpactor'
|
'phpactor'
|
||||||
|
@ -41,57 +23,50 @@ local function on_attach(args) -- {{{
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
local opts = { noremap = true, silent = true, buffer = args.buf }
|
|
||||||
local function mkOpts(desc)
|
local function mkOpts(desc)
|
||||||
return { noremap = true, silent = true, buffer = args.buf, desc = desc }
|
return { noremap = true, silent = true, buffer = args.buf, desc = desc }
|
||||||
end
|
end
|
||||||
|
|
||||||
-- use LSP default tagfunc
|
-- null-ls has mostly no hover and therefore trashes manpages for shell
|
||||||
-- if client.server_capabilities.definitionProvider then
|
|
||||||
-- vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
|
||||||
-- end
|
|
||||||
|
|
||||||
if client.server_capabilities.declarationProvider then
|
|
||||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, mkOpts('LSP declaration'))
|
|
||||||
end
|
|
||||||
|
|
||||||
if client.supports_method('textDocument/hover') and client.name ~= 'null-ls' then
|
if client.supports_method('textDocument/hover') and client.name ~= 'null-ls' then
|
||||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, mkOpts('LSP hover'))
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, mkOpts('LSP hover'))
|
||||||
end
|
end
|
||||||
|
|
||||||
if client.server_capabilities.implementationProvider then
|
|
||||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, mkOpts('LSP implementation'))
|
|
||||||
end
|
|
||||||
|
|
||||||
if client.server_capabilities.signatureHelpProvider then
|
if client.server_capabilities.signatureHelpProvider then
|
||||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, mkOpts('LSP signature help'))
|
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, mkOpts('LSP signature help'))
|
||||||
vim.keymap.set('i', '<C-k>', vim.lsp.buf.signature_help, mkOpts('LSP signature help'))
|
vim.keymap.set('i', '<C-k>', vim.lsp.buf.signature_help, mkOpts('LSP signature help'))
|
||||||
end
|
end
|
||||||
|
|
||||||
if client.server_capabilities.codeLensProvider then
|
|
||||||
vim.api.nvim_create_autocmd(
|
vim.api.nvim_create_autocmd(
|
||||||
{ 'BufEnter', 'CursorHold', 'InsertLeave' }, {
|
{ 'BufEnter', 'CursorHold', 'InsertLeave' }, {
|
||||||
callback = vim.lsp.codelens.refresh,
|
callback = vim.lsp.codelens.refresh,
|
||||||
buffer = bufnr,
|
buffer = bufnr,
|
||||||
})
|
})
|
||||||
vim.keymap.set('n', '<space>cl', vim.lsp.codelens.run, mkOpts('LSP Run code lens'))
|
vim.keymap.set('n', '<leader>cl', vim.lsp.codelens.run, mkOpts('LSP Run code lens'))
|
||||||
end
|
vim.keymap.set('n', '<leader>ci', vim.lsp.buf.implementation, mkOpts('LSP implementation'))
|
||||||
|
vim.keymap.set('n', '<leader>cd', vim.lsp.buf.type_definition, mkOpts('LSP type definition'))
|
||||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, mkOpts('LSP type definition'))
|
vim.keymap.set('n', '<leader>cD', vim.lsp.buf.declaration, mkOpts('LSP declaration'))
|
||||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, mkOpts('LSP rename'))
|
vim.keymap.set('n', '<leader>cR', vim.lsp.buf.rename, mkOpts('LSP rename'))
|
||||||
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, mkOpts('LSP Code action'))
|
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, mkOpts('LSP Code action'))
|
||||||
vim.keymap.set('v', '<space>ca', vim.lsp.buf.code_action, mkOpts('LSP Code action'))
|
vim.keymap.set('v', '<leader>ca', vim.lsp.buf.code_action, mkOpts('LSP Code action'))
|
||||||
|
vim.keymap.set('n', '<leader>cci', vim.lsp.buf.incoming_calls, mkOpts('LSP incoming calls'))
|
||||||
|
vim.keymap.set('n', '<leader>cco', vim.lsp.buf.outgoing_calls, mkOpts('LSP outgoing calls'))
|
||||||
-- vim.keymap.set('n', 'gr', vim.lsp.buf.references, mkOpts('LSP references'))
|
-- vim.keymap.set('n', 'gr', vim.lsp.buf.references, mkOpts('LSP references'))
|
||||||
vim.keymap.set('n', 'gr', '<Cmd>Trouble lsp_references<CR>', mkOpts('LSP references'))
|
vim.keymap.set('n', '<leader>cr', '<Cmd>Trouble lsp_references<CR>', mkOpts('LSP references'))
|
||||||
|
|
||||||
|
vim.keymap.set(
|
||||||
|
{ 'v', 'n' }, '<leader>F', function()
|
||||||
|
vim.lsp.buf.format({ async = true, filter = formatting_filter, })
|
||||||
|
end,
|
||||||
|
mkOpts('Lsp Format')
|
||||||
|
)
|
||||||
|
|
||||||
vim.keymap.set('n', '<space>F', function() vim.lsp.buf.format({ async = true, filter = formatting_filter, }) end,
|
|
||||||
opts)
|
|
||||||
if (formatting_filter(client)) then
|
if (formatting_filter(client)) then
|
||||||
vim.api.nvim_buf_set_option(bufnr, 'formatexpr', 'v:lua.vim.lsp.formatexpr(#{timeout_ms:250})')
|
vim.api.nvim_buf_set_option(bufnr, 'formatexpr', 'v:lua.vim.lsp.formatexpr(#{timeout_ms:250})')
|
||||||
end
|
end
|
||||||
end -- }}}
|
end -- }}}
|
||||||
|
|
||||||
function M.config()
|
local function config()
|
||||||
require('neodev').setup({})
|
require('neodev').setup({})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
@ -129,7 +104,7 @@ function M.config()
|
||||||
sumneko_lua = { -- {{{
|
sumneko_lua = { -- {{{
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
workspace = {
|
workleader = {
|
||||||
checkThirdParty = false,
|
checkThirdParty = false,
|
||||||
},
|
},
|
||||||
completion = {
|
completion = {
|
||||||
|
@ -195,25 +170,24 @@ function M.config()
|
||||||
conf.capabilities = capabilities
|
conf.capabilities = capabilities
|
||||||
nvim_lsp[name].setup(conf)
|
nvim_lsp[name].setup(conf)
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[ local util = require("lspconfig.util")
|
|
||||||
require("lspconfig.configs").coffeesense = {
|
|
||||||
default_config = {
|
|
||||||
cmd = { '/home/vladimir/devel/coffeesense/server/bin/coffeesense-language-server' },
|
|
||||||
filetypes = { 'coffee' },
|
|
||||||
root_dir = function(pattern)
|
|
||||||
local cwd = vim.loop.cwd()
|
|
||||||
local root = util.root_pattern('package.json', '.git')(pattern)
|
|
||||||
|
|
||||||
-- prefer cwd if root is a descendant
|
|
||||||
return util.path.is_descendant(cwd, root) and cwd or root
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
require("lspconfig").coffeesense.setup({}) ]]
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return {
|
||||||
|
{
|
||||||
|
'neovim/nvim-lspconfig',
|
||||||
|
dependencies = {
|
||||||
|
{ 'j-hui/fidget.nvim', config = true },
|
||||||
|
{ 'ray-x/lsp_signature.nvim', opts = { hint_prefix = '⥊ ', floating_window = false, hint_scheme = 'Identifier' } },
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ '<leader>li', '<Cmd>LspInfo<CR>', desc = 'Lsp info' },
|
||||||
|
{ '<leader>ll', '<Cmd>LspLog<CR>', desc = 'Lsp log' },
|
||||||
|
},
|
||||||
|
event = 'BufRead',
|
||||||
|
config = config,
|
||||||
|
},
|
||||||
|
{ 'SmiteshP/nvim-navic', lazy = true },
|
||||||
|
{ 'Hoffs/omnisharp-extended-lsp.nvim', lazy = true },
|
||||||
|
{ 'b0o/schemastore.nvim', lazy = true },
|
||||||
|
{ 'folke/neodev.nvim', lazy = true }
|
||||||
|
}
|
||||||
|
|
|
@ -7,10 +7,27 @@ return {
|
||||||
show_current_context = true,
|
show_current_context = true,
|
||||||
show_current_context_start = false,
|
show_current_context_start = false,
|
||||||
}},
|
}},
|
||||||
{ 'echasnovski/mini.surround', version = '*', config = function() require('mini.surround').setup({}) end },
|
|
||||||
-- { 'echasnovski/mini.indentscope', version = '*', config = function() require('mini.indentscope').setup({}) end },
|
|
||||||
{ 'echasnovski/mini.trailspace', version = '*', config = function() require('mini.trailspace').setup({}) end },
|
{ 'echasnovski/mini.trailspace', version = '*', config = function() require('mini.trailspace').setup({}) end },
|
||||||
|
|
||||||
|
-- stolen from LazyVim
|
||||||
|
{
|
||||||
|
"stevearc/dressing.nvim",
|
||||||
|
lazy = true,
|
||||||
|
init = function()
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
|
vim.ui.select = function(...)
|
||||||
|
require("lazy").load({ plugins = { "dressing.nvim" } })
|
||||||
|
return vim.ui.select(...)
|
||||||
|
end
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
|
vim.ui.input = function(...)
|
||||||
|
require("lazy").load({ plugins = { "dressing.nvim" } })
|
||||||
|
return vim.ui.input(...)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
'numToStr/Comment.nvim',
|
'numToStr/Comment.nvim',
|
||||||
config = true,
|
config = true,
|
||||||
|
@ -29,7 +46,29 @@ return {
|
||||||
|
|
||||||
{ 'dyng/ctrlsf.vim', cmd = 'CtrlSF' },
|
{ 'dyng/ctrlsf.vim', cmd = 'CtrlSF' },
|
||||||
|
|
||||||
{ 'andymass/vim-matchup' },
|
{ 'andymass/vim-matchup',
|
||||||
|
event = 'BufRead',
|
||||||
|
config = function()
|
||||||
|
vim.g.matchup_matchparen_offscreen = {}
|
||||||
|
end },
|
||||||
|
|
||||||
|
{
|
||||||
|
'echasnovski/mini.surround',
|
||||||
|
version = '*',
|
||||||
|
event = 'BufEnter',
|
||||||
|
config = function()
|
||||||
|
require('mini.surround').setup({})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
{ 'echasnovski/mini.statusline',
|
||||||
|
enabled = false,
|
||||||
|
event = 'VeryLazy',
|
||||||
|
version = '*',
|
||||||
|
config = function()
|
||||||
|
require('mini.statusline').setup({})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
{ 'fpob/nette.vim', ft = 'nette' },
|
{ 'fpob/nette.vim', ft = 'nette' },
|
||||||
{ 'ziglang/zig.vim', ft = 'zig' },
|
{ 'ziglang/zig.vim', ft = 'zig' },
|
||||||
|
@ -49,7 +88,16 @@ return {
|
||||||
{ '<Leader>td', '<Cmd>Trouble document_diagnostics<CR>', desc = 'Trouble toggle' }
|
{ '<Leader>td', '<Cmd>Trouble document_diagnostics<CR>', desc = 'Trouble toggle' }
|
||||||
},
|
},
|
||||||
config = {
|
config = {
|
||||||
mode = 'document_diagnostics'
|
mode = 'document_diagnostics',
|
||||||
|
signs = {
|
||||||
|
-- icons / text used for a diagnostic
|
||||||
|
error = "",
|
||||||
|
warning = "",
|
||||||
|
hint = "",
|
||||||
|
information = "",
|
||||||
|
other = ""
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,14 @@ function M.config()
|
||||||
-- return a.type > b.type
|
-- return a.type > b.type
|
||||||
-- end
|
-- end
|
||||||
-- end , -- this sorts files and directories descendantly
|
-- end , -- this sorts files and directories descendantly
|
||||||
|
event_handlers = {
|
||||||
|
{
|
||||||
|
event = 'neo_tree_window_after_open',
|
||||||
|
handler = function (ev)
|
||||||
|
vim.api.nvim_win_set_option(ev.winid, 'statusline', ' %{fnamemodify(getcwd(),":~")}')
|
||||||
|
end
|
||||||
|
}
|
||||||
|
},
|
||||||
default_component_configs = {
|
default_component_configs = {
|
||||||
container = {
|
container = {
|
||||||
enable_character_fade = true
|
enable_character_fade = true
|
||||||
|
|
|
@ -11,7 +11,7 @@ local M = {
|
||||||
}
|
}
|
||||||
|
|
||||||
function M.opts()
|
function M.opts()
|
||||||
local cmp = require 'cmp'
|
local cmp = require('cmp')
|
||||||
local kind_func = require('lspkind').cmp_format({})
|
local kind_func = require('lspkind').cmp_format({})
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
local M = {
|
local M = {
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-lua/popup.nvim',
|
|
||||||
'nvim-lua/plenary.nvim',
|
'nvim-lua/plenary.nvim',
|
||||||
'nvim-telescope/telescope-ui-select.nvim',
|
|
||||||
{
|
{
|
||||||
'nvim-telescope/telescope-fzf-native.nvim',
|
'nvim-telescope/telescope-fzf-native.nvim',
|
||||||
build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
|
build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
|
||||||
|
@ -65,7 +63,6 @@ function M.config()
|
||||||
}
|
}
|
||||||
|
|
||||||
telescope.load_extension('fzf')
|
telescope.load_extension('fzf')
|
||||||
telescope.load_extension('ui-select')
|
|
||||||
|
|
||||||
local augr = vim.api.nvim_create_augroup('Telescope', {})
|
local augr = vim.api.nvim_create_augroup('Telescope', {})
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
|
|
@ -5,7 +5,8 @@ local M = {
|
||||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
{ 'yioneko/nvim-yati', tag = 'legacy' }
|
{ 'yioneko/nvim-yati', tag = 'legacy' }
|
||||||
-- { dir = '/home/sogun/devel/nvim-yati/', }
|
-- { dir = '/home/sogun/devel/nvim-yati/', }
|
||||||
}
|
},
|
||||||
|
event = 'BufRead',
|
||||||
}
|
}
|
||||||
|
|
||||||
function M.config()
|
function M.config()
|
||||||
|
|
|
@ -6,6 +6,9 @@ return {
|
||||||
['<Space>f'] = { name = "+file"},
|
['<Space>f'] = { name = "+file"},
|
||||||
['<Space>g'] = { name = "+git"},
|
['<Space>g'] = { name = "+git"},
|
||||||
['<Space>l'] = { name = "+LSP"},
|
['<Space>l'] = { name = "+LSP"},
|
||||||
|
['<Space>t'] = { name = "+Trouble"},
|
||||||
|
['<Space>c'] = { name = "+Code"},
|
||||||
|
['<Space>cc'] = { name = "+calls"},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue