neovim

Personal neovim configuration files
git clone git://gtms.dev:neovim
Log | Files | Refs

commit 8bf003ea5261fb345e74af42db3a758982209123
parent f90a6596186b42319e41dd244da8359d6705d539
Author: Tomas Nemec <nemi@skaut.cz>
Date:   Fri, 16 Dec 2022 15:56:16 +0100

update

Diffstat:
Mafter/plugin/leap.lua | 16++++------------
Mafter/plugin/lsp.lua | 6------
Mafter/plugin/spectre.lua | 12+++++++++---
Mafter/plugin/treesitter.lua | 8--------
Mafter/plugin/ufo.lua | 6+++---
Mcolors/base16.lua | 36+++++++-----------------------------
Alua/tms/p/leap/init.lua | 5+++++
7 files changed, 28 insertions(+), 61 deletions(-)

diff --git a/after/plugin/leap.lua b/after/plugin/leap.lua @@ -5,22 +5,14 @@ end local leap = require('leap') leap.opts.highlight_unlabeled_phase_one_targets = true +local ast_ns = require('tms.p.leap').ast_ns + local default_highlights = function() - -- require('tms.colors').update(function(t) - -- t.Group.link('LeapBackdrop', t.groups.Comment) - -- t.Group.new('LeapMatch', t.colors.green, nil) - -- t.Group.new('LeapLabelPrimary', t.colors.yellow, nil, t.styles.underline) - -- t.Group.new('LeapLabelSecondary', t.colors.red, nil, t.styles.underline) - -- end) + vim.api.nvim_set_hl_ns(0) end local ast_highlights = function() - -- require('tms.colors').update(function(t) - -- t.Group.link('LeapBackdrop', t.groups.Comment) - -- t.Group.new('LeapMatch', t.colors.green, nil) - -- t.Group.new('LeapLabelPrimary', t.colors.yellow, nil, t.styles.reverse) - -- t.Group.new('LeapLabelSecondary', t.colors.red, nil, t.styles.reverse) - -- end) + vim.api.nvim_set_hl_ns(ast_ns) end default_highlights() diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua @@ -63,12 +63,6 @@ vim.api.nvim_create_autocmd('LspAttach', { end, }) --- require('tms.colors').update(function(t) --- t.Group.new('LspReferenceText', t.colors.green, t.colors.green, nil) --- t.Group.new('LspReferenceRead', t.colors.orange, t.colors.orange, nil) --- t.Group.new('LspReferenceWrite', t.colors.red, t.colors.red, nil) --- end) - local handlers = vim.lsp.handlers local with = vim.lsp.with handlers['textDocument/hover'] = with(handlers.hover, { border = 'single' }) diff --git a/after/plugin/spectre.lua b/after/plugin/spectre.lua @@ -1,7 +1,13 @@ -if not pcall(require, 'spectre') then return end +if not pcall(require, 'spectre') then + return +end -vim.keymap.set('n', '<leader>S', function() require('spectre').open() end) -vim.keymap.set('v', '<leader>s', function() require('spectre').open_visual() end) +vim.keymap.set('n', '<leader>S', function() + require('spectre').open() +end) +vim.keymap.set('v', '<leader>s', function() + require('spectre').open_visual() +end) require('spectre').setup({ mapping = { diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua @@ -94,11 +94,3 @@ require'nvim-treesitter.configs'.setup { vim.api.nvim_create_user_command('TSHRefresh', 'write|TSBufEnable highlight', {}) vim.keymap.set('n', '<leader>su', '<cmd>TSHRefresh<cr>') - --- require('tms.colors').update(function(t) --- t.Group.new('TSDefinition', t.colors.none, t.colors.none) --- t.Group.new('TSCurentScope', t.colors.none, t.colors.none) --- t.Group.new('TSDefinitionUsage', t.colors.none, t.dimm(t.groups.Normal.bg, 0.03)) --- -- context --- t.Group.new('TreesitterContext', t.colors.none, t.dimm(t.groups.Normal.bg, 0.06)) --- end) diff --git a/after/plugin/ufo.lua b/after/plugin/ufo.lua @@ -21,6 +21,6 @@ ufo.setup({ -- end, }) -require('tms.colors').update(function(t) - t.Group.new('UfoFoldedEllipsis', nil, t.dimm(t.groups.Normal.bg, 0.05)) -end) +-- require('tms.colors').update(function(t) +-- t.Group.new('UfoFoldedEllipsis', nil, t.dimm(t.groups.Normal.bg, 0.05)) +-- end) diff --git a/colors/base16.lua b/colors/base16.lua @@ -293,6 +293,13 @@ vim.api.nvim_set_hl(0, 'FloatBorder', {}) vim.api.nvim_set_hl(0, 'Beacon', { bg = 'fg' }) vim.api.nvim_set_hl(0, 'LspInlayHint', { fg = gui03 }) +-- leap +vim.api.nvim_set_hl(0, 'LeapBackdrop', { link = 'Comment' }) +vim.api.nvim_set_hl(0, 'LeapMatch', { fg = '#00ff00' }) +vim.api.nvim_set_hl(0, 'LeapLabelPrimary', { fg = '#ffff00' }) +vim.api.nvim_set_hl(require('tms.p.leap').ast_ns, 'LeapLabelPrimary', { link = 'LeapMatch' }) +vim.api.nvim_set_hl(0, 'LeapLabelSecondary', { fg = '#ff0000' }) + -- Diff highlighting vim.api.nvim_set_hl(0, 'DiffAdd', { fg = gui0B, bg = gui00 }) vim.api.nvim_set_hl(0, 'DiffChange', { fg = gui03, bg = gui00 }) @@ -309,32 +316,3 @@ vim.api.nvim_set_hl(0, 'GitGutterAdd', { fg = gui0B, bg = gui00 }) vim.api.nvim_set_hl(0, 'GitGutterChange', { fg = gui0D, bg = gui00 }) vim.api.nvim_set_hl(0, 'GitGutterDelete', { fg = gui08, bg = gui00 }) vim.api.nvim_set_hl(0, 'GitGutterChangeDelete', { fg = gui0E, bg = gui00 }) - --- local highlights = { --- ['@string.regex'] = {link = 'String', default = true}, --- -- ['@string.special'] = { link = 'SpecialChar', default = true }, --- -- ['@parameter.reference'] = { link = '@parameter', default = true }, --- ['@annotation'] = {link = 'PreProc', default = true}, --- ['@attribute'] = {link = 'PreProc', default = true}, --- -- ['@namespace'] = { link = 'Include', default = true }, --- ['@symbol'] = {link = 'Identifier', default = true}, --- -- ['@keyword.operator'] = { link = '@operator', default = true }, --- ['@variable.builtin'] = {link = 'Special', default = true}, --- ['@text.strong'] = {bold = true, default = true}, --- ['@text.emphasis'] = {italic = true, default = true}, --- ['@text.strike'] = {strikethrough = true}, --- ['@text.math'] = {link = 'Special', default = true}, --- -- ['@text.reference'] = { link = 'Constant', default = true }, --- ['@text.environment'] = {link = 'Macro', default = true}, --- ['@text.environment.name'] = {link = 'Type', default = true}, --- -- ['@text.title'] = { link = 'Title', default = true }, --- -- ['@text.literal'] = { link = 'String', default = true }, --- -- ['@text.uri'] = { link = 'Underlined', default = true }, --- ['@text.note'] = {link = 'SpecialComment', default = true}, --- ['@text.warning'] = {link = 'Todo', default = true}, --- ['@text.danger'] = {link = 'WarningMsg', default = true} --- -- ['@tag'] = { link = 'Label', default = true }, --- -- ['@tag.delimiter'] = { link = 'Delimiter', default = true }, --- -- ['@tag.attribute'] = { link = '@property', default = true }, --- } --- for group, hl_map in pairs(highlights) do vim.api.nvim_set_hl(0, group, hl_map) end diff --git a/lua/tms/p/leap/init.lua b/lua/tms/p/leap/init.lua @@ -0,0 +1,5 @@ +local M = {} + +M.ast_ns = vim.api.nvim_create_namespace('user-leap-ast') + +return M