mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-25 00:38:23 -05:00
Another commit for neovim
- highlights: delete unused ones, set some custom highlights for specified plugins. Also use orange for TSType (to distinguish with TSKeyword) - plugins: remove coq_nvim
This commit is contained in:
parent
133dd68322
commit
6df7ee09a5
@ -193,12 +193,12 @@ function M.snippets_conf()
|
|||||||
ext_opts = {
|
ext_opts = {
|
||||||
[types.choiceNode] = {
|
[types.choiceNode] = {
|
||||||
active = {
|
active = {
|
||||||
virt_text = {{'●', 'Orange'}}
|
virt_text = {{'●', 'LuaSnipChoice'}}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[types.insertNode] = {
|
[types.insertNode] = {
|
||||||
active = {
|
active = {
|
||||||
virt_text = {{'●', 'Blue'}}
|
virt_text = {{'●', 'LuaSnipInsert'}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -208,21 +208,6 @@ function M.snippets_conf()
|
|||||||
require('luasnip/loaders/from_vscode').load()
|
require('luasnip/loaders/from_vscode').load()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- function M.coq_conf()
|
|
||||||
-- -- To add snippets from lsp servers, change lsp.lua:
|
|
||||||
-- -----
|
|
||||||
-- -- local coq = require('coq')
|
|
||||||
-- -- lspconf.<server>.setup(...) --> lspconf.<server>.setup(coq.lsp_ensure_capabilities(...))
|
|
||||||
-- vim.g.coq_settings = {
|
|
||||||
-- auto_start = true,
|
|
||||||
-- display = {
|
|
||||||
-- icons = {
|
|
||||||
-- mode = 'none'
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
-- end
|
|
||||||
|
|
||||||
function M.autotag_conf()
|
function M.autotag_conf()
|
||||||
require('nvim-ts-autotag').setup {
|
require('nvim-ts-autotag').setup {
|
||||||
filetypes = {
|
filetypes = {
|
||||||
|
@ -491,11 +491,11 @@ end
|
|||||||
-- exclude = {'org'}, -- list of file types to exclude highlighting
|
-- exclude = {'org'}, -- list of file types to exclude highlighting
|
||||||
-- },
|
-- },
|
||||||
-- colors = {
|
-- colors = {
|
||||||
-- error = {'LspDiagnosticsDefaultError', 'TSDanger', 'Red'},
|
-- error = {'LspDiagnosticsDefaultError', 'TSDanger', '#bf616a', '#e06c75'},
|
||||||
-- warning = {'LspDiagnosticsDefaultWarning', 'TSWarning', 'Yellow'},
|
-- warning = {'LspDiagnosticsDefaultWarning', 'TSWarning', '#ebcb8b', '#e5c07b'},
|
||||||
-- info = {'LspDiagnosticsDefaultInformation', 'TSNote', 'Blue'},
|
-- info = {'LspDiagnosticsDefaultInformation', 'TSNote', '#81a1c1', '#61afef'},
|
||||||
-- hint = {'LspDiagnosticsDefaultHint', 'Cyan'},
|
-- hint = {'LspDiagnosticsDefaultHint', '#88c0d0', '#56b6c2'},
|
||||||
-- default = {'Normal', 'White'}
|
-- default = {'Normal', '#d8dee9', '#abb2bf'}
|
||||||
-- },
|
-- },
|
||||||
-- search = {
|
-- search = {
|
||||||
-- command = 'rg',
|
-- command = 'rg',
|
||||||
@ -524,10 +524,10 @@ end
|
|||||||
|
|
||||||
function M.dap_conf()
|
function M.dap_conf()
|
||||||
local dap = require('dap')
|
local dap = require('dap')
|
||||||
vim.fn.sign_define('DapBreakpoint', {text='', texthl='Orange'})
|
vim.fn.sign_define('DapBreakpoint', {text='', texthl='DapSignDefault'})
|
||||||
vim.fn.sign_define('DapLogPoint', {text='', texthl='Orange'})
|
vim.fn.sign_define('DapLogPoint', {text='', texthl='DapSignDefault'})
|
||||||
vim.fn.sign_define('DapStopped', {text='ﱢ', texthl='Orange'})
|
vim.fn.sign_define('DapStopped', {text='ﱢ', texthl='DapSignDefault'})
|
||||||
vim.fn.sign_define('DapBreakpointRejected', {text='', texthl='Red'})
|
vim.fn.sign_define('DapBreakpointRejected', {text='', texthl='DapSignRejected'})
|
||||||
|
|
||||||
-- Mappings
|
-- Mappings
|
||||||
vim.api.nvim_command('n', '<leader>dn', ':lua require("dap").continue()<CR>', {noremap = true, silent = true})
|
vim.api.nvim_command('n', '<leader>dn', ':lua require("dap").continue()<CR>', {noremap = true, silent = true})
|
||||||
|
@ -100,7 +100,7 @@ function M.load_options()
|
|||||||
-- opt.ttimeout = true
|
-- opt.ttimeout = true
|
||||||
opt.timeoutlen = 500
|
opt.timeoutlen = 500
|
||||||
opt.ttimeoutlen = 25
|
opt.ttimeoutlen = 25
|
||||||
opt.updatetime = 1000 -- how frequently writing to swap file is
|
opt.updatetime = 150
|
||||||
opt.redrawtime = 1500
|
opt.redrawtime = 1500
|
||||||
|
|
||||||
-- No swapfile
|
-- No swapfile
|
||||||
|
@ -264,15 +264,6 @@ return packer.startup(function(use)
|
|||||||
after = 'nvim-cmp',
|
after = 'nvim-cmp',
|
||||||
config = completion.autopairs_conf
|
config = completion.autopairs_conf
|
||||||
}
|
}
|
||||||
-- use {
|
|
||||||
-- 'ms-jpq/coq_nvim',
|
|
||||||
-- branch = 'coq',
|
|
||||||
-- event = 'InsertEnter',
|
|
||||||
-- run = ':COQdeps',
|
|
||||||
-- wants = 'coq.artifacts',
|
|
||||||
-- requires = {{'ms-jpq/coq.artifacts', branch = 'artifacts', opt = true}},
|
|
||||||
-- setup = completion.coq_conf
|
|
||||||
-- }
|
|
||||||
use {
|
use {
|
||||||
'windwp/nvim-ts-autotag',
|
'windwp/nvim-ts-autotag',
|
||||||
ft = {
|
ft = {
|
||||||
|
@ -26,30 +26,20 @@ end
|
|||||||
|
|
||||||
-- Editor related groups
|
-- Editor related groups
|
||||||
function M.highlight_editor()
|
function M.highlight_editor()
|
||||||
-- Color groups for other uses
|
|
||||||
hi('Red', c.red, '', '', '')
|
|
||||||
hi('Green', c.green, '', '', '')
|
|
||||||
hi('Yellow', c.yellow, '', '', '')
|
|
||||||
hi('Blue', c.blue, '', '', '')
|
|
||||||
hi('Purple', c.purple, '', '', '')
|
|
||||||
hi('Cyan', c.cyan, '', '', '')
|
|
||||||
hi('Orange', c.orange, '', '', '')
|
|
||||||
hi('White', c.fg, '', '', '')
|
|
||||||
|
|
||||||
-- Attributes
|
|
||||||
hi('Bold' , '', '', 'bold' , '')
|
|
||||||
hi('Italic' , '', '', 'italic' , '')
|
|
||||||
hi('Underline', '', '', 'underline', '')
|
|
||||||
|
|
||||||
-- Editor
|
-- Editor
|
||||||
|
hi('NormalFloat', c.fg , c.grey2, '', '')
|
||||||
hi('ColorColumn', '' , c.grey1, '', '')
|
hi('ColorColumn', '' , c.grey1, '', '')
|
||||||
hi('Cursor' , c.black , c.fg , '', '')
|
hi('Cursor' , c.black , c.fg , '', '')
|
||||||
|
hi('CursorIM' , c.black , c.white1, '', '')
|
||||||
hi('CursorLine' , '' , c.grey1, '', '')
|
hi('CursorLine' , '' , c.grey1, '', '')
|
||||||
|
hi('TermCursorNC', '' , c.grey1, '', '')
|
||||||
|
hi('Underlined' , c.green , '' , 'underline', '')
|
||||||
|
hi('Ignore' , c.grey1 , '' , '', '')
|
||||||
hi('Error' , c.fg , c.red , '', '')
|
hi('Error' , c.fg , c.red , '', '')
|
||||||
hi('iCursor' , c.black , c.fg , '', '')
|
|
||||||
hi('LineNr' , c.grey3 , '' , '', '')
|
hi('LineNr' , c.grey3 , '' , '', '')
|
||||||
hi('MatchParen' , c.cyan , c.grey3, '', '')
|
hi('MatchParen' , c.cyan , c.grey3, '', '')
|
||||||
hi('NonText' , c.grey2 , '' , '', '')
|
hi('NonText' , c.highlight, '' , '', '')
|
||||||
|
hi('EndOfBuffer', c.highlight, '' , '', '')
|
||||||
hi('Normal' , c.fg , c.black, '', '')
|
hi('Normal' , c.fg , c.black, '', '')
|
||||||
hi('Pmenu' , c.fg , c.grey2, '', '')
|
hi('Pmenu' , c.fg , c.grey2, '', '')
|
||||||
hi('PmenuSbar' , c.fg , c.grey2, '', '')
|
hi('PmenuSbar' , c.fg , c.grey2, '', '')
|
||||||
@ -62,11 +52,15 @@ function M.highlight_editor()
|
|||||||
hi('SpellRare' , c.white2, c.black, 'undercurl', c.white2)
|
hi('SpellRare' , c.white2, c.black, 'undercurl', c.white2)
|
||||||
hi('Visual' , '' , c.grey2 , '', '')
|
hi('Visual' , '' , c.grey2 , '', '')
|
||||||
hi('VisualNOS' , '' , c.grey2 , '', '')
|
hi('VisualNOS' , '' , c.grey2 , '', '')
|
||||||
-- Neovim support
|
|
||||||
|
-- quickfix
|
||||||
|
hi('QuickFixLine' , '' , c.blue , '', '')
|
||||||
|
hi('qfLineNr' , c.yellow, '' , '', '')
|
||||||
|
|
||||||
|
-- :checkhealth
|
||||||
hi('healthError' , c.red , c.grey1, '', '')
|
hi('healthError' , c.red , c.grey1, '', '')
|
||||||
hi('healthSuccess', c.green , c.grey1, '', '')
|
hi('healthSuccess', c.green , c.grey1, '', '')
|
||||||
hi('healthWarning', c.yellow, c.grey1, '', '')
|
hi('healthWarning', c.yellow, c.grey1, '', '')
|
||||||
hi('TermCursorNC' , '' , c.grey1, '', '')
|
|
||||||
|
|
||||||
-- Gutter
|
-- Gutter
|
||||||
hi('CursorColumn', '' , c.grey1, '', '')
|
hi('CursorColumn', '' , c.grey1, '', '')
|
||||||
@ -79,7 +73,6 @@ function M.highlight_editor()
|
|||||||
hi('Directory', c.cyan, '', '', '')
|
hi('Directory', c.cyan, '', '', '')
|
||||||
|
|
||||||
-- Prompt
|
-- Prompt
|
||||||
hi('EndOfBuffer', c.grey1, '' , '', '')
|
|
||||||
hi('ErrorMsg' , c.fg , c.red , '', '')
|
hi('ErrorMsg' , c.fg , c.red , '', '')
|
||||||
hi('ModeMsg' , c.fg , '' , '', '')
|
hi('ModeMsg' , c.fg , '' , '', '')
|
||||||
hi('MoreMsg' , c.cyan , '' , '', '')
|
hi('MoreMsg' , c.cyan , '' , '', '')
|
||||||
@ -116,7 +109,6 @@ function M.highlight_syntax()
|
|||||||
hi('Conceal', '', '', '', '')
|
hi('Conceal', '', '', '', '')
|
||||||
hi('Conditional', c.blue, '', '', '')
|
hi('Conditional', c.blue, '', '', '')
|
||||||
hi('Constant', c.fg, '', '', '')
|
hi('Constant', c.fg, '', '', '')
|
||||||
hi('Decorator', c.orange, '', '', '')
|
|
||||||
hi('Define', c.blue, '', '', '')
|
hi('Define', c.blue, '', '', '')
|
||||||
hi('Delimiter', c.white2, '', '', '')
|
hi('Delimiter', c.white2, '', '', '')
|
||||||
hi('Exception', c.blue, '', '', '')
|
hi('Exception', c.blue, '', '', '')
|
||||||
@ -139,9 +131,8 @@ function M.highlight_syntax()
|
|||||||
hi('Structure', c.blue, '', '', '')
|
hi('Structure', c.blue, '', '', '')
|
||||||
hi('Tag', c.fg, '', '', '')
|
hi('Tag', c.fg, '', '', '')
|
||||||
hi('Todo', c.yellow, '', '', '')
|
hi('Todo', c.yellow, '', '', '')
|
||||||
hi('Type', c.blue, '', '', '')
|
hi('Type', c.orange, '', '', '')
|
||||||
hi('Typedef', c.blue, '', '', '')
|
hi('Typedef', c.blue, '', '', '')
|
||||||
cmd('hi! link Annotation Decorator')
|
|
||||||
cmd('hi! link Macro Define')
|
cmd('hi! link Macro Define')
|
||||||
cmd('hi! link PreCondit PreProc')
|
cmd('hi! link PreCondit PreProc')
|
||||||
cmd('hi! link Variable Identifier')
|
cmd('hi! link Variable Identifier')
|
||||||
@ -196,7 +187,7 @@ end
|
|||||||
|
|
||||||
-- Treesitter (:h nvim-treesitter-highlights)
|
-- Treesitter (:h nvim-treesitter-highlights)
|
||||||
function M.highlight_treesitter()
|
function M.highlight_treesitter()
|
||||||
cmd('hi! link TSAnnotation Annotation')
|
hi('TSAnnotation', c.dark_blue, '', 'italic', '')
|
||||||
hi('TSCharacter', c.green, '', '', '')
|
hi('TSCharacter', c.green, '', '', '')
|
||||||
hi('TSConstructor', c.blue, '', '', '')
|
hi('TSConstructor', c.blue, '', '', '')
|
||||||
hi('TSConstant', c.yellow, '', '', '')
|
hi('TSConstant', c.yellow, '', '', '')
|
||||||
@ -225,14 +216,15 @@ function M.highlight_treesitter()
|
|||||||
hi('TSStringRegex', c.teal, '', '', '')
|
hi('TSStringRegex', c.teal, '', '', '')
|
||||||
hi('TSStringEscape', c.purple, '', '', '')
|
hi('TSStringEscape', c.purple, '', '', '')
|
||||||
hi('TSSymbol', c.purple, '', '', '')
|
hi('TSSymbol', c.purple, '', '', '')
|
||||||
hi('TSType', c.blue, '', '', '')
|
hi('TSType', c.orange, '', '', '')
|
||||||
hi('TSTypeBuiltin', c.blue, '', '', '')
|
hi('TSTypeBuiltin', c.orange, '', '', '')
|
||||||
hi('TSTag', c.fg, '', '', '')
|
hi('TSTag', c.fg, '', '', '')
|
||||||
hi('TSTagDelimiter', c.purple, '', '', '')
|
hi('TSTagDelimiter', c.purple, '', '', '')
|
||||||
hi('TSText', c.fg, '', '', '')
|
hi('TSText', c.fg, '', '', '')
|
||||||
hi('TSTextReference', c.purple, '', '', '')
|
hi('TSTextReference', c.purple, '', '', '')
|
||||||
|
hi('TSStrong' , c.fg, '', 'bold', '')
|
||||||
hi('TSEmphasis', c.fg, '', 'bold,italic', '')
|
hi('TSEmphasis', c.fg, '', 'bold,italic', '')
|
||||||
cmd('hi! link TSUnderline Underline')
|
hi('TSUnderline', '', '', 'underline', '')
|
||||||
hi('TSTitle', c.dark_blue, '', 'bold', '')
|
hi('TSTitle', c.dark_blue, '', 'bold', '')
|
||||||
hi('TSLiteral', c.fg, '', '', '')
|
hi('TSLiteral', c.fg, '', '', '')
|
||||||
hi('TSURI', c.green, '', 'underline', '')
|
hi('TSURI', c.green, '', 'underline', '')
|
||||||
@ -248,7 +240,6 @@ function M.highlight_treesitter()
|
|||||||
cmd('hi! link TSFuncBuiltin Function')
|
cmd('hi! link TSFuncBuiltin Function')
|
||||||
cmd('hi! link TSVariable Variable')
|
cmd('hi! link TSVariable Variable')
|
||||||
cmd('hi! link TSVariableBuiltin Variable')
|
cmd('hi! link TSVariableBuiltin Variable')
|
||||||
cmd('hi! link TSStrong Bold')
|
|
||||||
cmd('hi! link TSStructure Structure')
|
cmd('hi! link TSStructure Structure')
|
||||||
|
|
||||||
hi('TSNote', c.blue, '', 'bold', '')
|
hi('TSNote', c.blue, '', 'bold', '')
|
||||||
@ -297,12 +288,20 @@ function M.highlight_plugins()
|
|||||||
hi('CmpItemKind', c.orange, '', '', '')
|
hi('CmpItemKind', c.orange, '', '', '')
|
||||||
hi('CmpItemMenu', c.blue, '', '', '')
|
hi('CmpItemMenu', c.blue, '', '', '')
|
||||||
|
|
||||||
|
-- LuaSnip
|
||||||
|
hi('LuaSnipChoice', c.orange, '', '', '')
|
||||||
|
hi('LuaSnipInsert', c.blue, '', '', '')
|
||||||
|
|
||||||
-- Gitsigns
|
-- Gitsigns
|
||||||
hi('GitSignsAddNr' , c.green , '', '', '')
|
hi('GitSignsAddNr' , c.green , '', '', '')
|
||||||
hi('GitSignsChangeNr', c.yellow, '', '', '')
|
hi('GitSignsChangeNr', c.yellow, '', '', '')
|
||||||
hi('GitSignsDeleteNr', c.red , '', '', '')
|
hi('GitSignsDeleteNr', c.red , '', '', '')
|
||||||
hi('GitSignsCurrentLineBlame', c.grey_bright, '', 'italic,bold', '')
|
hi('GitSignsCurrentLineBlame', c.grey_bright, '', 'italic,bold', '')
|
||||||
|
|
||||||
|
-- dap.nvim
|
||||||
|
hi('DapSignDefault', c.orange, '', '', '')
|
||||||
|
hi('DapSignRejected', c.red, '', '', '')
|
||||||
|
|
||||||
-- ts-rainbow
|
-- ts-rainbow
|
||||||
hi('rainbowcol1', c.red, '', 'bold', '')
|
hi('rainbowcol1', c.red, '', 'bold', '')
|
||||||
hi('rainbowcol2', c.orange, '', 'bold', '')
|
hi('rainbowcol2', c.orange, '', 'bold', '')
|
||||||
@ -361,8 +360,8 @@ function M.highlight_plugins()
|
|||||||
hi('WindowPickerSwap', c.fg, c.orange, 'bold', '')
|
hi('WindowPickerSwap', c.fg, c.orange, 'bold', '')
|
||||||
|
|
||||||
-- vim-illuminate
|
-- vim-illuminate
|
||||||
cmd('hi! link illuminatedWord Underline')
|
hi('illuminatedWord', '', '', 'underline', '')
|
||||||
cmd('hi! link illuminatedCurWord Underline')
|
hi('illuminatedCurWord', '', '', 'underline', '')
|
||||||
|
|
||||||
-- trouble.nvim
|
-- trouble.nvim
|
||||||
hi('LspTroubleText', c.blue, '', 'bold', '')
|
hi('LspTroubleText', c.blue, '', 'bold', '')
|
||||||
|
Loading…
Reference in New Issue
Block a user