aboutsummaryrefslogtreecommitdiff
path: root/user/kakoune
diff options
context:
space:
mode:
authorRosa <rosaontheweb@proton.me>2026-01-10 17:59:55 -0500
committerRosa <rosaontheweb@proton.me>2026-01-10 17:59:55 -0500
commit5570be9c9c64e0ba2474d73c2b6b23508b916fd6 (patch)
tree53e2f7939b668a50d8f51f857a8659989de85c2b /user/kakoune
parent488bd4b5c08d6fe9c44b0fa5cd3750265c2be482 (diff)
custom function for system creation
Diffstat (limited to 'user/kakoune')
-rw-r--r--user/kakoune/default.nix72
-rw-r--r--user/kakoune/kakrc4
-rw-r--r--user/kakoune/qml.kak28
3 files changed, 0 insertions, 104 deletions
diff --git a/user/kakoune/default.nix b/user/kakoune/default.nix
deleted file mode 100644
index 2a76f7a..0000000
--- a/user/kakoune/default.nix
+++ /dev/null
@@ -1,72 +0,0 @@
-{ config, pkgs, ... }:
-{
- programs.kakoune = {
- enable = true;
- colorSchemePackage = pkgs.kakounePlugins.kakoune-catppuccin;
- config = {
- colorScheme = "catppuccin_mocha";
- hooks = [
- {
- commands = "set window indentwidth 2";
- group = "indentwidth";
- name = "WinSetOption";
- option = "filetype=(nix)";
- }
- {
- commands = "lsp-enable-window";
- name = "WinSetOption";
- option = "filetype=(javascript|kotlin|qml|typescript|zig)";
- }
- {
- commands = ''
- set-option buffer lsp_servers %{
- [kotlin-language-server]
- root_globs = ["build.gradle.kts"]
- }
- '';
- name = "BufSetOption";
- option = "filetype=kotlin";
- }
- {
- commands = ''
- set-option buffer lsp_servers %{
- [qmlls]
- root_globs = ["shell.qml"]
- }
- '';
- name = "BufSetOption";
- option = "filetype=qml";
- }
- ];
-
- keyMappings = [
- {
- docstring = "Opens a new editor window";
- effect = ":new<ret>";
- key = "<c-w>";
- mode = "normal";
- }
- ];
-
- numberLines = {
- enable = true;
- highlightCursor = true;
- };
-
- ui = {
- assistant = "cat";
- setTitle = true;
- };
- };
-
- defaultEditor = true;
- extraConfig = builtins.readFile ./kakrc;
- plugins = with pkgs.kakounePlugins; [
- auto-pairs-kak
- kakoune-extra-filetypes
- kakoune-lsp
- ];
- };
-
- xdg.configFile."kak/qml.kak".source = ./qml.kak;
-}
diff --git a/user/kakoune/kakrc b/user/kakoune/kakrc
deleted file mode 100644
index fa3152a..0000000
--- a/user/kakoune/kakrc
+++ /dev/null
@@ -1,4 +0,0 @@
-enable-auto-pairs
-eval %sh{kak-lsp --kakoune -s $kak_session}
-# hacky workaround for kakoune seemingly only loading from one autoload dir
-source /home/rosa/.config/kak/qml.kak
diff --git a/user/kakoune/qml.kak b/user/kakoune/qml.kak
deleted file mode 100644
index 697467f..0000000
--- a/user/kakoune/qml.kak
+++ /dev/null
@@ -1,28 +0,0 @@
-hook global BufCreate .+\.qml %{
- set-option buffer filetype qml
-}
-
-hook global WinSetOption filetype=qml %{
- require-module qml
- add-highlighter window/qml ref qml
- hook -once global WinSetOption filetype=.+\.(?!qml) %{
- remove-highlighter window/qml
- }
-}
-
-provide-module qml %{
- add-highlighter shared/qml regions
- add-highlighter shared/qml/comment-line region '//' '\n' fill comment
- add-highlighter shared/qml/comment-block region '/\*' '\*/' fill comment
- add-highlighter shared/qml/string region '"' '"' fill string
- add-highlighter shared/qml/other default-region group
- add-highlighter shared/qml/other/keywords regex \
- \b(import|as|property|final|readonly|required|default)\b 0:keyword
- add-highlighter shared/qml/other/numbers regex -?[0-9]+(\.[0-9]+)? 0:value
- add-highlighter shared/qml/other/booleans regex true|false 0:value
- # this one was kind of annoying :(
- add-highlighter shared/qml/other/type regex '([a-zA-Z]+ *)(\{.*\})' 1:type
- add-highlighter shared/qml/other/builtin-types regex \
- \b(bool|date|double|int|list|real|string|url|var(iant)?|void)\b 0:type
- add-highlighter shared/qml/other/function regex ([a-zA-Z]+[a-zA-Z0-9]*)\(.*\) 1:function
-}