neovim

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

commit ec5dc04d490fc7986faf0595be847491a7d79898
parent 2178aecfb1f649c8b5c1392258dc4ca34bef6786
Author: Tomas Nemec <nemi@skaut.cz>
Date:   Tue, 21 Mar 2023 20:30:17 +0100

update

Diffstat:
Mafter/plugin/cmp.lua | 2+-
Mafter/plugin/qmk.lua | 41+++++++++++++++++++++++++++++++++++++++++
Mafter/plugin/treesitter.lua | 2+-
Mlua/plugins.lua | 3+++
Mlua/tms/options.lua | 1+
5 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/after/plugin/cmp.lua b/after/plugin/cmp.lua @@ -65,7 +65,7 @@ cmp.setup({ require('luasnip').lsp_expand(args.body) end, }, - view = { entries = { name = 'custom', selection_order = 'near_cursor' } }, + view = { entries = { name = 'custom' } }, formatting = { format = function(entry, vim_item) -- Kind icons diff --git a/after/plugin/qmk.lua b/after/plugin/qmk.lua @@ -255,3 +255,44 @@ vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { } end, }) + +if pcall(require, 'qmk') then + -- ,-----------------------------------------------------------------------------------. + -- | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + -- |------+------+------+------+------+------+------+------+------+------+------+------| + -- | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + -- |------+------+------+------+------+------+------+------+------+------+------+------| + -- | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + -- |------+------+------+------+------+------+------+------+------+------+------+------| + -- | | | | | | | | Next | Vol- | Vol+ | Play | + -- `-----------------------------------------------------------------------------------' + + local planck = { + name = 'LAYOUT_planck_grid', + layout = { + 'x x x x x x x x x x x x', + 'x x x x x x x x x x x x', + 'x x x x x x x x x x x x', + 'x x x x x x x x x x x x', + }, + comment_preview = { keymap_overrides = { XXXXXXX = 'XX', KC_NO = 'XX' } }, + } + + local ergo = { + name = 'LAYOUT_ergodox_pretty', + layout = { + 'x x x x x x x _ _ x x x x x x x', + 'x x x x x x _ _ _ _ x x x x x x', + 'x x x x x x x _ _ x x x x x x x', + 'x x x x x x x _ _ x x x x x x x', + 'x x x x x _ _ _ _ _ _ x x x x x', + '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _', + '_ _ _ _ _ x x _ _ x x _ _ _ _ _', + '_ _ _ _ _ _ x _ _ x _ _ _ _ _ _', + '_ _ _ _ x x x _ _ x x x _ _ _ _', + }, + comment_preview = { keymap_overrides = { XXXXXXX = 'XX', KC_NO = 'XX' } }, + } + + require('qmk').setup(planck) +end diff --git a/after/plugin/treesitter.lua b/after/plugin/treesitter.lua @@ -48,7 +48,7 @@ require'nvim-treesitter.configs'.setup { ['aa'] = '@parameter.outer', ['af'] = '@function.outer', ['if'] = '@function.inner', - ['ac'] = '@comment.outer', + ['ac'] = '@comment.tms', ['im'] = '@identifier', }, }, diff --git a/lua/plugins.lua b/lua/plugins.lua @@ -153,6 +153,9 @@ return packer.startup({ -- Godot use 'habamax/vim-godot' + -- qmk + use 'codethread/qmk.nvim' + -- personal use 'GenesisTMS/trans.nvim' -- use 'git@gitlab.com:gtms/dart-tools.nvim' diff --git a/lua/tms/options.lua b/lua/tms/options.lua @@ -4,6 +4,7 @@ vim.opt.completeopt = 'menu,menuone,noselect' -- vim.opt.equalalways = false -- exp vim.opt.grepprg = 'rg --vimgrep --no-heading --smart-case' vim.opt.grepformat = '%f:%l:%c:%m' +vim.opt.formatoptions:append{ 'o', 'r' } vim.opt.ignorecase = true -- use `/C` to force case vim.opt.inccommand = 'split' vim.opt.pumheight = 5