From 8d8f9dd794a5e6fad900fd2e84f8466c47a4afa1 Mon Sep 17 00:00:00 2001 From: mewoocat Date: Wed, 24 Dec 2025 11:20:58 -0600 Subject: [PATCH] filetype no work --- lib/languages.nix | 10 +++++----- modules/plugins/languages/markdown.nix | 2 +- modules/plugins/languages/nix.nix | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/languages.nix b/lib/languages.nix index f4e4f990..46766843 100644 --- a/lib/languages.nix +++ b/lib/languages.nix @@ -86,13 +86,13 @@ in { vim.autocmds = [ { desc = "Sets indent for nix files"; - event = ["BufEnter"]; - pattern = [ "*.${language}" ]; + event = ["FileType"]; + pattern = [ language ]; callback = mkLuaInline '' function() - vim.opt.tabstop = ${toString indentSize} - vim.opt.softtabstop = ${toString indentSize} - vim.opt.shiftwidth = ${toString indentSize} + vim.bo.tabstop = ${toString indentSize} + vim.bo.softtabstop = ${toString indentSize} + vim.bo.shiftwidth = ${toString indentSize} end ''; once = true; diff --git a/modules/plugins/languages/markdown.nix b/modules/plugins/languages/markdown.nix index 427c401c..2bacb512 100644 --- a/modules/plugins/languages/markdown.nix +++ b/modules/plugins/languages/markdown.nix @@ -208,7 +208,7 @@ in { }) (setLanguageIndent { - language = "md"; + language = "markdown"; indentSize = 4; }) diff --git a/modules/plugins/languages/nix.nix b/modules/plugins/languages/nix.nix index afc26104..0373e0ae 100644 --- a/modules/plugins/languages/nix.nix +++ b/modules/plugins/languages/nix.nix @@ -112,7 +112,7 @@ in { indentSize = mkOption { description = "Sets the indent size in spaces for .nix files"; type = int; - default = 2; + default = 10; }; };