kakoune config

This commit is contained in:
Charlie Root 2024-07-16 11:13:12 +02:00
commit a920b04973
16 changed files with 174 additions and 156 deletions

View file

@ -12,7 +12,7 @@ local options = {
backspace = { 'indent', 'eol', 'start' }, -- backspace through everything in insert mode
hidden = true, -- Enable background buffers
history = 100, -- Remember N lines in history
lazyredraw = false, -- Faster scrolling if enabled, breaks noice
lazyredraw = true, -- Faster scrolling if enabled, breaks noice
synmaxcol = 240, -- Max column for syntax highlight
updatetime = 250, -- ms to wait for trigger an event

View file

@ -1,30 +1,30 @@
if vim.g.neovide then
local vks = vim.keymap.set
local vks = vim.keymap.set
vim.g.neovide_scale_factor = 1.0
vim.g.minianimate_disable = true
vim.g.neovide_window_blurred = true
vim.g.neovide_transparency = 0.80
vim.g.neovide_show_border = true
vim.g.neovide_input_macos_alt_is_meta = true
vim.g.neovide_cursor_animate_command_line = false -- noice incompat
vim.g.neovide_cursor_smooth_blink = true
vim.g.neovide_cursor_vfx_mode = 'ripple'
vim.g.neovide_scale_factor = 1.0
vim.g.minianimate_disable = true
vim.g.neovide_window_blurred = true
vim.g.neovide_transparency = 0.80
vim.g.neovide_show_border = true
vim.g.neovide_input_macos_alt_is_meta = true
vim.g.neovide_cursor_animate_command_line = true -- noice incompat
vim.g.neovide_cursor_smooth_blink = true
vim.g.neovide_cursor_vfx_mode = 'ripple'
-- keymaps
vks('v', '<D-c>', '"+y') -- Copy
vks({ 'n', 'v' }, '<D-v>', '"+P') -- Paste
vks({ 'i', 'c' }, '<D-v>', '<C-R>+') -- Paste
vks('t', '<D-v>', [[<C-\><C-N>"+P]]) -- Paste
vks('n', '<D-+>', function()
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * 1.1
end)
vks('n', '<D-->', function()
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor / 1.1
end)
vks({ 'n', 'v', 't', 'i' }, '<D-}>', [[<C-\><C-N><Cmd>tabnext<CR>]])
vks({ 'n', 'v', 't', 'i' }, '<D-{>', [[<C-\><C-N><Cmd>tabprev<CR>]])
vks({ 'n', 'v', 't', 'i' }, '<D-l>', [[<C-\><C-N><Cmd>tabnext #<CR>]])
vks({ 'n', 'v', 't', 'i' }, '<D-t>', [[<C-\><C-N><Cmd>tabnew<CR>]])
vks({ 'n', 'v', 't', 'i' }, '<D-w>', [[<C-\><C-N><Cmd>tabclose<CR>]])
-- keymaps
vks('v', '<D-c>', '"+y') -- Copy
vks({ 'n', 'v' }, '<D-v>', '"+P') -- Paste
vks({ 'i', 'c' }, '<D-v>', '<C-R>+') -- Paste
vks('t', '<D-v>', [[<C-\><C-N>"+P]]) -- Paste
vks('n', '<D-+>', function()
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * 1.1
end)
vks('n', '<D-->', function()
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor / 1.1
end)
vks({ 'n', 'v', 't', 'i' }, '<D-}>', [[<C-\><C-N><Cmd>tabnext<CR>]])
vks({ 'n', 'v', 't', 'i' }, '<D-{>', [[<C-\><C-N><Cmd>tabprev<CR>]])
vks({ 'n', 'v', 't', 'i' }, '<D-l>', [[<C-\><C-N><Cmd>tabnext #<CR>]])
vks({ 'n', 'v', 't', 'i' }, '<D-t>', [[<C-\><C-N><Cmd>tabnew<CR>]])
vks({ 'n', 'v', 't', 'i' }, '<D-w>', [[<C-\><C-N><Cmd>tabclose<CR>]])
end

View file

@ -1,12 +1,12 @@
local noice = require('noice')
--local noice = require('noice')
local no_top_text = {
opts = {
border = {
text = { top = '' },
opts = {
border = {
text = { top = '' },
},
},
},
}
--[[
-- luacheck: ignore
noice.setup({
cmdline = {
@ -18,7 +18,6 @@ noice.setup({
search_up = no_top_text,
},
},
lsp = {
override = {
['cmp.entry.get_documentation'] = true,
@ -70,3 +69,4 @@ noice.setup({
},
},
})
--]]

View file

@ -7,7 +7,7 @@
in {
programs.neovim-flake.settings.vim = {
ui = {
noice.enable = true;
noice.enable = false;
colorizer.enable = true;
modes-nvim.enable = true;
illuminate.enable = true;

View file

@ -6,7 +6,7 @@
inputs,
...
}: let
inherit (builtins) filter map toString path isPath throw;
inherit (builtins) filter map toString path;
inherit (lib.filesystem) listFilesRecursive;
inherit (lib.strings) hasSuffix fileContents;
inherit (lib.attrsets) genAttrs;
@ -64,17 +64,19 @@ in {
};
additionalRuntimePaths = [
(mkRuntimeDir "after")
(mkRuntimeDir "spell")
#(mkRuntimeDir "after")
#(mkRuntimeDir "spell")
./runtime/spell
./runtime/after
];
# while I should be doing this in luaConfigRC below
# I have come to realise that spellfile contents are
# actually **not** loaded when luaConfigRC is used.
# as spellfile is a vim thing, this should be fine
configRC.spellfile = entryAnywhere ''
set spellfile=${toString ./spell/runtime/en.utf-8.add} " toString sanitizes the path
'';
# configRC.spellfile = entryAnywhere ''
# set spellfile=${toString ./runtime/spell/en.utf-8.add} " toString sanitizes the path
# '';
# additional lua configuration that I can append
# or, to be more precise, randomly inject into