commit ccb66a5a792c40a50a8d096ed77635b2a4ee0307
parent 827322b0572d7983089712c8773c76ef9a0b0b12
Author: Tomas Nemec <nemi@skaut.cz>
Date: Sat, 11 Mar 2023 01:43:13 +0100
update
Diffstat:
9 files changed, 90 insertions(+), 15 deletions(-)
diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua
@@ -31,7 +31,7 @@ parser_configs.norg_table = {
require'nvim-treesitter.configs'.setup {
ensure_intalled = 'all',
ignore_install = { 'lua', 'vim', 'c' },
- highlight = { enable = true, disable = { 'lua', 'vim', 'c', 'dart' } },
+ highlight = { enable = true },
indent = { enable = true },
diff --git a/after/queries/dart/highlights.scm b/after/queries/dart/highlights.scm
@@ -0,0 +1,6 @@
+;; extends
+
+(annotation
+ name: (identifier) @annotation)
+(marker_annotation
+ name: (identifier) @annotation)
diff --git a/colors/base16.lua b/colors/base16.lua
@@ -356,3 +356,81 @@ end
vim.api.nvim_set_hl(0, '@lsp.mod.annotation', { italic = true })
vim.api.nvim_set_hl(0, '@lsp.type.type', { bold = true })
+-- vim.api.nvim_set_hl(0, '@variable.builtin', { link = 'Keyword' })
+
+for tsgroup, opts in pairs({
+ ['@annotation'] = { italic = true, default = true },
+ ['@comment'] = { link = 'Comment' },
+ ['@none'] = { bg = 'NONE', fg = 'NONE' },
+ ['@preproc'] = { link = 'PreProc' },
+ ['@define'] = { link = 'Define' },
+ ['@operator'] = { link = 'Operator' },
+ ['@punctuation.delimiter'] = { link = 'Delimiter' },
+ ['@punctuation.bracket'] = { link = 'Delimiter' },
+ ['@punctuation.special'] = { link = 'Delimiter' },
+ ['@string'] = { link = 'String' },
+ ['@string.regex'] = { link = 'String' },
+ ['@string.escape'] = { link = 'SpecialChar' },
+ ['@string.special'] = { link = 'SpecialChar' },
+ ['@character'] = { link = 'Character' },
+ ['@character.special'] = { link = 'SpecialChar' },
+ ['@boolean'] = { link = 'Boolean' },
+ ['@number'] = { link = 'Number' },
+ ['@float'] = { link = 'Float' },
+ ['@function'] = { link = 'Function' },
+ ['@function.call'] = { link = 'Function' },
+ ['@function.builtin'] = { link = 'Special' },
+ ['@function.macro'] = { link = 'Macro' },
+ ['@method'] = { link = 'Function' },
+ ['@method.call'] = { link = 'Function' },
+ ['@constructor'] = { link = 'Special' },
+ ['@parameter'] = { link = 'Identifier' },
+ ['@keyword'] = { link = 'Keyword' },
+ ['@keyword.function'] = { link = 'Keyword' },
+ ['@keyword.return'] = { link = 'Keyword' },
+ ['@conditional'] = { link = 'Conditional' },
+ ['@repeat'] = { link = 'Repeat' },
+ ['@debug'] = { link = 'Debug' },
+ ['@label'] = { link = 'Label' },
+ ['@include'] = { link = 'Include' },
+ ['@exception'] = { link = 'Exception' },
+ ['@type'] = { link = 'Type' },
+ ['@type.builtin'] = { link = 'Type' },
+ ['@type.qualifier'] = { link = 'Type' },
+ ['@type.definition'] = { link = 'Typedef' },
+ ['@storageclass'] = { link = 'StorageClass' },
+ ['@attribute'] = { link = 'PreProc' },
+ ['@field'] = { link = 'Identifier' },
+ ['@property'] = { link = 'Identifier' },
+ ['@variable.builtin'] = { link = 'Special' },
+ ['@constant'] = { link = 'Constant' },
+ ['@constant.builtin'] = { link = 'Special' },
+ ['@constant.macro'] = { link = 'Define' },
+ ['@symbol'] = { link = 'Identifier' },
+ ['@text.title'] = { link = 'Title' },
+ ['@text.literal'] = { link = 'String' },
+ ['@text.uri'] = { link = 'Underlined' },
+ ['@text.math'] = { link = 'Special' },
+ ['@text.environment'] = { link = 'Macro' },
+ ['@text.environment.name'] = { link = 'Type' },
+ ['@text.reference'] = { link = 'Constant' },
+ ['@text.todo'] = { link = 'Todo' },
+ ['@text.todo.unchecked'] = { link = 'Todo' },
+ ['@text.todo.checked'] = { link = 'Done' },
+ ['@text.note'] = { link = 'SpecialComment' },
+ ['@text.warning'] = { link = 'WarningMsg' },
+ ['@text.danger'] = { link = 'ErrorMsg' },
+ ['@text.diff.add'] = { link = 'diffAdded' },
+ ['@text.diff.delete'] = { link = 'diffRemoved' },
+ ['@tag'] = { link = 'Tag' },
+ ['@tag.attribute'] = { link = 'Identifier' },
+ ['@tag.delimiter'] = { link = 'Delimiter' },
+
+ -- nvim-treesitter (0.8 overrides)
+ -- ['@text.strong'] = { bold = true },
+ -- ['@text.strike'] = { strikethrough = true },
+ -- ['@text.emphasis'] = { italic = true },
+ -- ['@text.underline'] = { underline = true },
+}) do
+ vim.api.nvim_set_hl(0, tsgroup, opts)
+end
diff --git a/ftplugin/c.lua b/ftplugin/c.lua
@@ -1 +0,0 @@
-vim.treesitter.start()
diff --git a/ftplugin/dart.lua b/ftplugin/dart.lua
@@ -22,8 +22,6 @@ if string.find(full_path, '%.pub%-cache') then
end
vim.lsp.start(require'tms.lsp'.make_opts('dartls'))
-vim.treesitter.start()
-vim.bo.syntax = 'off'
vim.keymap.set('n', '<leader>ar', vim.cmd.make)
vim.keymap.set('n', '<leader>at', vim.cmd.Trun)
diff --git a/ftplugin/help.lua b/ftplugin/help.lua
@@ -1 +0,0 @@
-vim.treesitter.start()
diff --git a/ftplugin/lua.lua b/ftplugin/lua.lua
@@ -1,5 +1,4 @@
vim.bo.efm = [[lua: %f:%l: %m]]
vim.bo.makeprg = [[lua %:S]]
-vim.treesitter.start()
vim.keymap.set('n', '<leader>ar', vim.cmd.make)
diff --git a/ftplugin/vim.lua b/ftplugin/vim.lua
@@ -1,2 +0,0 @@
-vim.cmd.syntax('off')
-vim.treesitter.start()
diff --git a/syntax/qf.vim b/syntax/qf.vim
@@ -1,4 +1,4 @@
-if exists("b:current_syntax")
+if exists('b:current_syntax')
finish
endif
@@ -15,9 +15,7 @@ hi def link qfFileName Directory
hi def link qfSeparatorLeft Delimiter
hi def link qfSeparatorRight Delimiter
hi def link qfLineNr LineNr
-hi def link qfError CocErrorSign
-hi def link qfWarning CocWarningSign
-hi def link qfInfo CocInfoSign
-hi def link qfNote CocHintSign
-
-let b:current_syntax = 'qf'
+hi def link qfError DiagnosticError
+hi def link qfWarning DiagnosticWarn
+hi def link qfInfo DiagnosticInfo
+hi def link qfNote DiagnosticHint