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:
Hoang Nguyen 2021-10-21 19:55:49 +07:00
parent 133dd68322
commit 6df7ee09a5
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
5 changed files with 41 additions and 66 deletions

View File

@ -193,12 +193,12 @@ function M.snippets_conf()
ext_opts = {
[types.choiceNode] = {
active = {
virt_text = {{'', 'Orange'}}
virt_text = {{'', 'LuaSnipChoice'}}
}
},
[types.insertNode] = {
active = {
virt_text = {{'', 'Blue'}}
virt_text = {{'', 'LuaSnipInsert'}}
}
}
}
@ -208,21 +208,6 @@ function M.snippets_conf()
require('luasnip/loaders/from_vscode').load()
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()
require('nvim-ts-autotag').setup {
filetypes = {

View File

@ -491,11 +491,11 @@ end
-- exclude = {'org'}, -- list of file types to exclude highlighting
-- },
-- colors = {
-- error = {'LspDiagnosticsDefaultError', 'TSDanger', 'Red'},
-- warning = {'LspDiagnosticsDefaultWarning', 'TSWarning', 'Yellow'},
-- info = {'LspDiagnosticsDefaultInformation', 'TSNote', 'Blue'},
-- hint = {'LspDiagnosticsDefaultHint', 'Cyan'},
-- default = {'Normal', 'White'}
-- error = {'LspDiagnosticsDefaultError', 'TSDanger', '#bf616a', '#e06c75'},
-- warning = {'LspDiagnosticsDefaultWarning', 'TSWarning', '#ebcb8b', '#e5c07b'},
-- info = {'LspDiagnosticsDefaultInformation', 'TSNote', '#81a1c1', '#61afef'},
-- hint = {'LspDiagnosticsDefaultHint', '#88c0d0', '#56b6c2'},
-- default = {'Normal', '#d8dee9', '#abb2bf'}
-- },
-- search = {
-- command = 'rg',
@ -524,10 +524,10 @@ end
function M.dap_conf()
local dap = require('dap')
vim.fn.sign_define('DapBreakpoint', {text='', texthl='Orange'})
vim.fn.sign_define('DapLogPoint', {text='', texthl='Orange'})
vim.fn.sign_define('DapStopped', {text='', texthl='Orange'})
vim.fn.sign_define('DapBreakpointRejected', {text='', texthl='Red'})
vim.fn.sign_define('DapBreakpoint', {text='', texthl='DapSignDefault'})
vim.fn.sign_define('DapLogPoint', {text='', texthl='DapSignDefault'})
vim.fn.sign_define('DapStopped', {text='', texthl='DapSignDefault'})
vim.fn.sign_define('DapBreakpointRejected', {text='', texthl='DapSignRejected'})
-- Mappings
vim.api.nvim_command('n', '<leader>dn', ':lua require("dap").continue()<CR>', {noremap = true, silent = true})

View File

@ -100,7 +100,7 @@ function M.load_options()
-- opt.ttimeout = true
opt.timeoutlen = 500
opt.ttimeoutlen = 25
opt.updatetime = 1000 -- how frequently writing to swap file is
opt.updatetime = 150
opt.redrawtime = 1500
-- No swapfile

View File

@ -264,15 +264,6 @@ return packer.startup(function(use)
after = 'nvim-cmp',
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 {
'windwp/nvim-ts-autotag',
ft = {

View File

@ -26,30 +26,20 @@ end
-- Editor related groups
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
hi('NormalFloat', c.fg , c.grey2, '', '')
hi('ColorColumn', '' , c.grey1, '', '')
hi('Cursor' , c.black , c.fg , '', '')
hi('CursorIM' , c.black , c.white1, '', '')
hi('CursorLine' , '' , c.grey1, '', '')
hi('TermCursorNC', '' , c.grey1, '', '')
hi('Underlined' , c.green , '' , 'underline', '')
hi('Ignore' , c.grey1 , '' , '', '')
hi('Error' , c.fg , c.red , '', '')
hi('iCursor' , c.black , c.fg , '', '')
hi('LineNr' , 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('Pmenu' , 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('Visual' , '' , 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('healthSuccess', c.green , c.grey1, '', '')
hi('healthWarning', c.yellow, c.grey1, '', '')
hi('TermCursorNC' , '' , c.grey1, '', '')
-- Gutter
hi('CursorColumn', '' , c.grey1, '', '')
@ -79,7 +73,6 @@ function M.highlight_editor()
hi('Directory', c.cyan, '', '', '')
-- Prompt
hi('EndOfBuffer', c.grey1, '' , '', '')
hi('ErrorMsg' , c.fg , c.red , '', '')
hi('ModeMsg' , c.fg , '' , '', '')
hi('MoreMsg' , c.cyan , '' , '', '')
@ -116,7 +109,6 @@ function M.highlight_syntax()
hi('Conceal', '', '', '', '')
hi('Conditional', c.blue, '', '', '')
hi('Constant', c.fg, '', '', '')
hi('Decorator', c.orange, '', '', '')
hi('Define', c.blue, '', '', '')
hi('Delimiter', c.white2, '', '', '')
hi('Exception', c.blue, '', '', '')
@ -139,9 +131,8 @@ function M.highlight_syntax()
hi('Structure', c.blue, '', '', '')
hi('Tag', c.fg, '', '', '')
hi('Todo', c.yellow, '', '', '')
hi('Type', c.blue, '', '', '')
hi('Type', c.orange, '', '', '')
hi('Typedef', c.blue, '', '', '')
cmd('hi! link Annotation Decorator')
cmd('hi! link Macro Define')
cmd('hi! link PreCondit PreProc')
cmd('hi! link Variable Identifier')
@ -196,7 +187,7 @@ end
-- Treesitter (:h nvim-treesitter-highlights)
function M.highlight_treesitter()
cmd('hi! link TSAnnotation Annotation')
hi('TSAnnotation', c.dark_blue, '', 'italic', '')
hi('TSCharacter', c.green, '', '', '')
hi('TSConstructor', c.blue, '', '', '')
hi('TSConstant', c.yellow, '', '', '')
@ -225,14 +216,15 @@ function M.highlight_treesitter()
hi('TSStringRegex', c.teal, '', '', '')
hi('TSStringEscape', c.purple, '', '', '')
hi('TSSymbol', c.purple, '', '', '')
hi('TSType', c.blue, '', '', '')
hi('TSTypeBuiltin', c.blue, '', '', '')
hi('TSType', c.orange, '', '', '')
hi('TSTypeBuiltin', c.orange, '', '', '')
hi('TSTag', c.fg, '', '', '')
hi('TSTagDelimiter', c.purple, '', '', '')
hi('TSText', c.fg, '', '', '')
hi('TSTextReference', c.purple, '', '', '')
hi('TSStrong' , c.fg, '', 'bold', '')
hi('TSEmphasis', c.fg, '', 'bold,italic', '')
cmd('hi! link TSUnderline Underline')
hi('TSUnderline', '', '', 'underline', '')
hi('TSTitle', c.dark_blue, '', 'bold', '')
hi('TSLiteral', c.fg, '', '', '')
hi('TSURI', c.green, '', 'underline', '')
@ -248,7 +240,6 @@ function M.highlight_treesitter()
cmd('hi! link TSFuncBuiltin Function')
cmd('hi! link TSVariable Variable')
cmd('hi! link TSVariableBuiltin Variable')
cmd('hi! link TSStrong Bold')
cmd('hi! link TSStructure Structure')
hi('TSNote', c.blue, '', 'bold', '')
@ -297,12 +288,20 @@ function M.highlight_plugins()
hi('CmpItemKind', c.orange, '', '', '')
hi('CmpItemMenu', c.blue, '', '', '')
-- LuaSnip
hi('LuaSnipChoice', c.orange, '', '', '')
hi('LuaSnipInsert', c.blue, '', '', '')
-- Gitsigns
hi('GitSignsAddNr' , c.green , '', '', '')
hi('GitSignsChangeNr', c.yellow, '', '', '')
hi('GitSignsDeleteNr', c.red , '', '', '')
hi('GitSignsCurrentLineBlame', c.grey_bright, '', 'italic,bold', '')
-- dap.nvim
hi('DapSignDefault', c.orange, '', '', '')
hi('DapSignRejected', c.red, '', '', '')
-- ts-rainbow
hi('rainbowcol1', c.red, '', 'bold', '')
hi('rainbowcol2', c.orange, '', 'bold', '')
@ -361,8 +360,8 @@ function M.highlight_plugins()
hi('WindowPickerSwap', c.fg, c.orange, 'bold', '')
-- vim-illuminate
cmd('hi! link illuminatedWord Underline')
cmd('hi! link illuminatedCurWord Underline')
hi('illuminatedWord', '', '', 'underline', '')
hi('illuminatedCurWord', '', '', 'underline', '')
-- trouble.nvim
hi('LspTroubleText', c.blue, '', 'bold', '')