aboutsummaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorRosa <rosaontheweb@proton.me>2026-01-10 14:28:50 -0500
committerRosa <rosaontheweb@proton.me>2026-01-10 14:28:50 -0500
commitd37741dd73c7ae3703587ac9318e9d0855553e95 (patch)
tree8e189b057e32c4aba89903f9a4e85f673bfe3255 /user
parent6ea74c2ead3c77ac5d04e315de5508a0f2f1ec12 (diff)
minor changes, prepping for a refactor
Diffstat (limited to 'user')
-rw-r--r--user/kakoune/default.nix16
-rw-r--r--user/kakoune/kakrc2
-rw-r--r--user/kakoune/qml.kak28
-rw-r--r--user/wm/librewolf.nix9
-rw-r--r--user/zsh.nix1
5 files changed, 51 insertions, 5 deletions
diff --git a/user/kakoune/default.nix b/user/kakoune/default.nix
index 8ccad3e..2a76f7a 100644
--- a/user/kakoune/default.nix
+++ b/user/kakoune/default.nix
@@ -15,18 +15,28 @@
{
commands = "lsp-enable-window";
name = "WinSetOption";
- option = "filetype=(javascript|kotlin|typescript|zig)";
+ option = "filetype=(javascript|kotlin|qml|typescript|zig)";
}
{
commands = ''
set-option buffer lsp_servers %{
[kotlin-language-server]
- root_globs = ["build.gradle.kts"]
+ 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 = [
@@ -57,4 +67,6 @@
kakoune-lsp
];
};
+
+ xdg.configFile."kak/qml.kak".source = ./qml.kak;
}
diff --git a/user/kakoune/kakrc b/user/kakoune/kakrc
index b327805..fa3152a 100644
--- a/user/kakoune/kakrc
+++ b/user/kakoune/kakrc
@@ -1,2 +1,4 @@
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
new file mode 100644
index 0000000..697467f
--- /dev/null
+++ b/user/kakoune/qml.kak
@@ -0,0 +1,28 @@
+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
+}
diff --git a/user/wm/librewolf.nix b/user/wm/librewolf.nix
index ab353dd..d596716 100644
--- a/user/wm/librewolf.nix
+++ b/user/wm/librewolf.nix
@@ -15,9 +15,12 @@
noRFP = {
id = 1;
name = "RFP Disabled";
- settings = lib.mkMerge [config.programs.librewolf.profiles.default.settings {
- "privacy.resistFingerprinting" = false;
- }];
+ settings = lib.mkMerge [
+ config.programs.librewolf.profiles.default.settings
+ {
+ "privacy.resistFingerprinting" = false;
+ }
+ ];
};
};
};
diff --git a/user/zsh.nix b/user/zsh.nix
index 730f0e7..d264bd9 100644
--- a/user/zsh.nix
+++ b/user/zsh.nix
@@ -1,5 +1,6 @@
{ config, ... }:
{
+ programs.direnv.enable = true;
programs.zsh = {
enable = true;
autocd = true;