nvim: styles and Overseer
This commit is contained in:
parent
8f7ae28a48
commit
d5a279bce8
7 changed files with 73 additions and 41 deletions
|
@ -142,7 +142,7 @@ function M:hl(group, fg, bg, styles, opts)
|
||||||
o.ctermbg = self.pallete[bg][2]
|
o.ctermbg = self.pallete[bg][2]
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, st in pairs(styles) do
|
for _, st in pairs(styles or {}) do
|
||||||
o[st] = true
|
o[st] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ function M.setup()
|
||||||
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
pattern = { 'qf', 'man', 'help', 'tsplayground' },
|
pattern = { 'qf', 'man', 'help', 'tsplayground', 'checkhealth', 'OverseerList' },
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
local buf = args.buf
|
local buf = args.buf
|
||||||
local bo = vim.bo[buf]
|
local bo = vim.bo[buf]
|
||||||
|
|
|
@ -70,6 +70,9 @@ function M.config()
|
||||||
|
|
||||||
link('@type.qualifier', 'Keyword')
|
link('@type.qualifier', 'Keyword')
|
||||||
link('@storageclass', 'Keyword')
|
link('@storageclass', 'Keyword')
|
||||||
|
|
||||||
|
link('@tag.attribute', 'Identifier')
|
||||||
|
link('@tag.delimiter', 'Delimiter')
|
||||||
end -- }}}
|
end -- }}}
|
||||||
|
|
||||||
local function normalizeTroubleHighlight() -- {{{
|
local function normalizeTroubleHighlight() -- {{{
|
||||||
|
@ -157,6 +160,8 @@ function M.config()
|
||||||
gr:hl('DiagnosticVirtualTextInfo', 'info', nil, { 'italic', })
|
gr:hl('DiagnosticVirtualTextInfo', 'info', nil, { 'italic', })
|
||||||
gr:hl('DiagnosticVirtualTextHint', 'hint', nil, { 'italic', })
|
gr:hl('DiagnosticVirtualTextHint', 'hint', nil, { 'italic', })
|
||||||
|
|
||||||
|
gr:hl('@attribute', 'aqua')
|
||||||
|
|
||||||
-- gr:hl('GitSignsAddLine', nil, 'faded_green', {})
|
-- gr:hl('GitSignsAddLine', nil, 'faded_green', {})
|
||||||
-- vim.fn.sign_define('GitSignsAdd', { text = '│', texthl = 'GitSignsAdd', linehl = 'GitSignsAddLine', culhl='CursorLine' })
|
-- vim.fn.sign_define('GitSignsAdd', { text = '│', texthl = 'GitSignsAdd', linehl = 'GitSignsAddLine', culhl='CursorLine' })
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -4,13 +4,13 @@ return {
|
||||||
cmd = 'ColorizerToggle',
|
cmd = 'ColorizerToggle',
|
||||||
},
|
},
|
||||||
|
|
||||||
{ 'AndrewRadev/linediff.vim', cmd = 'Linediff' },
|
{ 'AndrewRadev/linediff.vim', cmd = 'Linediff' },
|
||||||
|
|
||||||
{ 'lukas-reineke/indent-blankline.nvim', config = true, opts = {
|
{ 'lukas-reineke/indent-blankline.nvim', config = true, opts = {
|
||||||
show_current_context = true,
|
show_current_context = true,
|
||||||
show_current_context_start = false,
|
show_current_context_start = false,
|
||||||
}},
|
} },
|
||||||
{ '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
|
-- stolen from LazyVim
|
||||||
{
|
{
|
||||||
|
@ -30,6 +30,31 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ 'stevearc/overseer.nvim',
|
||||||
|
config = true,
|
||||||
|
cmd = {
|
||||||
|
'OverseerBuild',
|
||||||
|
'OverseerClearCache',
|
||||||
|
'OverseerClose',
|
||||||
|
'OverseerDeleteBundle',
|
||||||
|
'OverseerInfo',
|
||||||
|
'OverseerLoadBundle',
|
||||||
|
'OverseerOpen',
|
||||||
|
'OverseerQuickAction',
|
||||||
|
'OverseerRun',
|
||||||
|
'OverseerRunCmd',
|
||||||
|
'OverseerSaveBundle',
|
||||||
|
'OverseerTaskAction',
|
||||||
|
'OverseerToggle',
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ '<leader>xx', '<Cmd>OverseerToggle<CR>', desc = 'Overseer toggle' },
|
||||||
|
{ '<leader>xi', '<Cmd>OverseerInfo<CR>', desc = 'Overseer info' },
|
||||||
|
{ '<leader>xa', '<Cmd>OverseerTaskAction<CR>', desc = 'Overseer action' },
|
||||||
|
{ '<leader>xr', '<Cmd>OverseerRun<CR>', desc = 'Overseer run' },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
'numToStr/Comment.nvim',
|
'numToStr/Comment.nvim',
|
||||||
|
@ -42,7 +67,7 @@ return {
|
||||||
'vlada-dudr/vdebug',
|
'vlada-dudr/vdebug',
|
||||||
lazy = true,
|
lazy = true,
|
||||||
keys = {
|
keys = {
|
||||||
{ '<F5>', desc = 'Start Vdebug' },
|
{ '<F5>', desc = 'Start Vdebug' },
|
||||||
{ '<F10>', desc = 'Vdebug breakpoint' },
|
{ '<F10>', desc = 'Vdebug breakpoint' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -52,8 +77,8 @@ return {
|
||||||
{ 'andymass/vim-matchup',
|
{ 'andymass/vim-matchup',
|
||||||
event = 'BufRead',
|
event = 'BufRead',
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.matchup_matchparen_offscreen = {}
|
vim.g.matchup_matchparen_offscreen = {}
|
||||||
end },
|
end },
|
||||||
|
|
||||||
{
|
{
|
||||||
'echasnovski/mini.surround',
|
'echasnovski/mini.surround',
|
||||||
|
@ -73,7 +98,7 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ 'fpob/nette.vim', ft = 'nette', },
|
{ 'fpob/nette.vim', ft = 'nette', },
|
||||||
{ 'ziglang/zig.vim', ft = 'zig', },
|
{ 'ziglang/zig.vim', ft = 'zig', },
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -87,7 +112,7 @@ return {
|
||||||
lazy = true,
|
lazy = true,
|
||||||
cmd = { 'Trouble', 'TroubleToggle', },
|
cmd = { 'Trouble', 'TroubleToggle', },
|
||||||
keys = {
|
keys = {
|
||||||
{ '<Leader>tt', '<Cmd>TroubleToggle<CR>', desc = 'Trouble toggle', },
|
{ '<Leader>tt', '<Cmd>TroubleToggle<CR>', desc = 'Trouble toggle', },
|
||||||
{ '<Leader>td', '<Cmd>Trouble document_diagnostics<CR>', desc = 'Trouble toggle', },
|
{ '<Leader>td', '<Cmd>Trouble document_diagnostics<CR>', desc = 'Trouble toggle', },
|
||||||
},
|
},
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -23,34 +23,36 @@ function M.config()
|
||||||
nls.builtins.formatting.phpcsfixer.with({
|
nls.builtins.formatting.phpcsfixer.with({
|
||||||
extra_args = {
|
extra_args = {
|
||||||
'--rules',
|
'--rules',
|
||||||
vim.fn.json_encode({
|
[[{
|
||||||
['@Symfony'] = true,
|
"@Symfony": true,
|
||||||
nullable_type_declaration_for_default_null_value = true,
|
"fully_qualified_strict_types": false,
|
||||||
array_syntax = { syntax = 'short' },
|
"array_syntax": {
|
||||||
fully_qualified_strict_types = false,
|
"syntax": "short"
|
||||||
binary_operator_spaces = {
|
|
||||||
default = 'single_space',
|
|
||||||
operators = {
|
|
||||||
['=>'] = 'align_single_space_minimal',
|
|
||||||
['='] = 'align_single_space_minimal',
|
|
||||||
['??='] = 'align_single_space_minimal',
|
|
||||||
['^='] = 'align_single_space_minimal',
|
|
||||||
['|='] = 'align_single_space_minimal',
|
|
||||||
['+='] = 'align_single_space_minimal',
|
|
||||||
['%='] = 'align_single_space_minimal',
|
|
||||||
['&='] = 'align_single_space_minimal',
|
|
||||||
['**='] = 'align_single_space_minimal',
|
|
||||||
['*='] = 'align_single_space_minimal',
|
|
||||||
['-='] = 'align_single_space_minimal',
|
|
||||||
['.='] = 'align_single_space_minimal',
|
|
||||||
['/='] = 'align_single_space_minimal',
|
|
||||||
['<<='] = 'align_single_space_minimal',
|
|
||||||
['<='] = 'align_single_space_minimal',
|
|
||||||
['>='] = 'align_single_space_minimal',
|
|
||||||
['>>='] = 'align_single_space_minimal'
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}),
|
"nullable_type_declaration_for_default_null_value": true,
|
||||||
|
"binary_operator_spaces": {
|
||||||
|
"default": "single_space",
|
||||||
|
"operators": {
|
||||||
|
">>=": "align_single_space_minimal",
|
||||||
|
"<<=": "align_single_space_minimal",
|
||||||
|
"/=": "align_single_space_minimal",
|
||||||
|
"*=": "align_single_space_minimal",
|
||||||
|
"^=": "align_single_space_minimal",
|
||||||
|
"%=": "align_single_space_minimal",
|
||||||
|
"=>": "align_single_space_minimal",
|
||||||
|
"|=": "align_single_space_minimal",
|
||||||
|
".=": "align_single_space_minimal",
|
||||||
|
"<=": "align_single_space_minimal",
|
||||||
|
">=": "align_single_space_minimal",
|
||||||
|
"+=": "align_single_space_minimal",
|
||||||
|
"**=": "align_single_space_minimal",
|
||||||
|
"&=": "align_single_space_minimal",
|
||||||
|
"=": "align_single_space_minimal",
|
||||||
|
"-=": "align_single_space_minimal",
|
||||||
|
"??=": "align_single_space_minimal"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}]]
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
nls.builtins.diagnostics.shellcheck,
|
nls.builtins.diagnostics.shellcheck,
|
||||||
|
|
|
@ -26,12 +26,14 @@
|
||||||
(scoped_call_expression
|
(scoped_call_expression
|
||||||
scope: [(name) (qualified_name)] @type)
|
scope: [(name) (qualified_name)] @type)
|
||||||
(class_constant_access_expression
|
(class_constant_access_expression
|
||||||
. [(name) (qualified_name)] @type
|
(relative_scope)
|
||||||
(name) @constant)
|
(name) @constant)
|
||||||
(trait_declaration
|
(trait_declaration
|
||||||
name: (name) @type)
|
name: (name) @type)
|
||||||
(use_declaration
|
(use_declaration
|
||||||
(name) @type)
|
(name) @type)
|
||||||
|
(relative_scope) @type
|
||||||
|
|
||||||
|
|
||||||
; Functions, methods, constructors
|
; Functions, methods, constructors
|
||||||
|
|
||||||
|
@ -87,8 +89,6 @@
|
||||||
|
|
||||||
; Variables
|
; Variables
|
||||||
|
|
||||||
(relative_scope) @variable.builtin
|
|
||||||
|
|
||||||
((name) @constant
|
((name) @constant
|
||||||
(#vim-match? @constant "^_?[A-Z][A-Z\d_]*$"))
|
(#vim-match? @constant "^_?[A-Z][A-Z\d_]*$"))
|
||||||
((name) @constant.builtin
|
((name) @constant.builtin
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
" If you would like to use another vi clone such as Elvis or Vile
|
" If you would like to use another vi clone such as Elvis or Vile
|
||||||
" you will need to change this setting.
|
" you will need to change this setting.
|
||||||
|
|
||||||
set vicmd=vim
|
set vicmd=nvim
|
||||||
" set vicmd=elvis\ -G\ termcap
|
" set vicmd=elvis\ -G\ termcap
|
||||||
" set vicmd=vile
|
" set vicmd=vile
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue