kakoune config
This commit is contained in:
parent
32390d228b
commit
a920b04973
16 changed files with 174 additions and 156 deletions
|
@ -8,7 +8,7 @@
|
|||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.editors.emacs;
|
||||
username = config.modules.other.system.username;
|
||||
inherit (config.modules.other.system) username;
|
||||
repoUrl = inputs.doomemacs;
|
||||
configRepoUrl = inputs.doom-emacs-config;
|
||||
emacs-desktop-symbol = pkgs.makeDesktopItem {
|
||||
|
@ -24,18 +24,17 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
## Emacs itself as an overlay
|
||||
nixpkgs.overlays = [inputs.emacs-overlay.overlay];
|
||||
|
||||
#nixpkgs.overlays = [inputs.emacs-overlay.overlay];
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacs29-pgtk;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
binutils # native-comp needs 'as', provided by this
|
||||
# 28.2 + native-comp
|
||||
((emacsPackagesFor emacsNativeComp).emacsWithPackages
|
||||
(epkgs: [epkgs.vterm]))
|
||||
|
||||
emacs-desktop-symbol
|
||||
## Doom dependencies
|
||||
git
|
||||
(ripgrep.override {withPCRE2 = true;})
|
||||
ripgrep
|
||||
gnutls # for TLS connectivity
|
||||
|
||||
## Optional dependencies
|
||||
|
@ -45,20 +44,17 @@ in {
|
|||
|
||||
## Module dependencies
|
||||
# :checkers spell
|
||||
(aspellWithDicts (ds: with ds; [en en-computers en-science]))
|
||||
(aspellWithDicts (ds: with ds; [en en-computers en-science de]))
|
||||
# :tools editorconfig
|
||||
editorconfig-core-c # per-project style config
|
||||
# :tools lookup & :lang org +roam
|
||||
sqlite
|
||||
# :lang latex & :lang org (latex previews)
|
||||
texlive.combined.scheme-medium
|
||||
# :lang beancount
|
||||
beancount
|
||||
];
|
||||
|
||||
home-manager.users.${username}.home.sessionPath = ["/home/vali/.config/emacs/bin"];
|
||||
|
||||
# modules.shell.zsh.rcFiles = [ "${configDir}/emacs/aliases.zsh" ];
|
||||
environment.variables.PATH = ["/home/vali/.config/emacs/bin"];
|
||||
|
||||
fonts.fonts = [pkgs.emacs-all-the-icons-fonts];
|
||||
|
||||
|
|
|
@ -1 +1,50 @@
|
|||
_: {imports = [./kakoune.nix];}
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
}: let
|
||||
inherit (config.modules.other.system) username;
|
||||
cfg = config.modules.editors.kakoune;
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
in {
|
||||
options.modules.editors.kakoune.enable = mkEnableOption "kakoune";
|
||||
config.home-manager.users.${username}.programs.kakoune = mkIf cfg.enable {
|
||||
enable = true;
|
||||
config = {
|
||||
autoComplete = true;
|
||||
autoReload = true;
|
||||
indentWidth = 4;
|
||||
tabStop = 4;
|
||||
incrementalSearch = false;
|
||||
numberLines = {
|
||||
enable = true;
|
||||
relative = true;
|
||||
highlightCursor = true;
|
||||
separator = "|";
|
||||
};
|
||||
|
||||
scrollOff = {
|
||||
lines = 4;
|
||||
columns = 4;
|
||||
};
|
||||
ui = {
|
||||
enableMouse = true;
|
||||
assistant = "none";
|
||||
statusLine = "bottom";
|
||||
wrapLines = {
|
||||
enable = true;
|
||||
indent = true;
|
||||
word = true;
|
||||
};
|
||||
};
|
||||
plugins = with pkgs.kakounePlugins; [
|
||||
auto-pairs-kak
|
||||
fzf-kak
|
||||
powerline-kak
|
||||
byline-kak
|
||||
kakoune-lsp
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
0
modules/editors/kakoune/mappings.nix
Normal file
0
modules/editors/kakoune/mappings.nix
Normal 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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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({
|
|||
},
|
||||
},
|
||||
})
|
||||
--]]
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue