diff --git a/home/programs/editors/helix/languages.nix b/home/programs/editors/helix/languages.nix index 3515591..08d4bc0 100644 --- a/home/programs/editors/helix/languages.nix +++ b/home/programs/editors/helix/languages.nix @@ -42,7 +42,7 @@ }; } { - name = "javascript"; + name = "typescript"; auto-format = true; language-servers = [ "scls" @@ -52,8 +52,13 @@ } ]; formatter = with pkgs; { - command = lib.getExe biome; - args = ["format"]; + command = lib.getExe deno; + args = [ + "fmt" + "-" + "--ext" + "ts" + ]; }; } { diff --git a/home/programs/editors/neovim/default.nix b/home/programs/editors/neovim/default.nix deleted file mode 100644 index d698a0f..0000000 --- a/home/programs/editors/neovim/default.nix +++ /dev/null @@ -1,78 +0,0 @@ -{inputs, ...}: { - imports = [ - inputs.nixvim.homeManagerModules.nixvim - ./plugins - ./themes - ]; - programs.nixvim = { - enable = true; - clipboard.providers.wl-copy.enable = true; - autoGroups = { - vim_enter = {}; - }; - highlightOverride = { - LspInlayHint.bg = ""; - }; - autoCmd = [ - { - group = "vim_enter"; - event = ["VimEnter"]; - pattern = "*"; - command = "Neotree"; - } - ]; - keymaps = [ - { - action = "LazyGit"; - key = ""; - mode = "n"; - } - { - action = "ToggleTerm"; - key = ""; - mode = "n"; - } - { - action = "Telescope"; - key = ""; - mode = "n"; - } - ]; - extraConfigLua = '' - vim.wo.relativenumber = true - ''; - extraConfigLuaPre = '' - local slow_format_filetypes = {} - - vim.api.nvim_create_user_command("FormatDisable", function(args) - if args.bang then - -- FormatDisable! will disable formatting just for this buffer - vim.b.disable_autoformat = true - else - vim.g.disable_autoformat = true - end - end, { - desc = "Disable autoformat-on-save", - bang = true, - }) - vim.api.nvim_create_user_command("FormatEnable", function() - vim.b.disable_autoformat = false - vim.g.disable_autoformat = false - end, { - desc = "Re-enable autoformat-on-save", - }) - vim.api.nvim_create_user_command("FormatToggle", function(args) - if args.bang then - -- Toggle formatting for current buffer - vim.b.disable_autoformat = not vim.b.disable_autoformat - else - -- Toggle formatting globally - vim.g.disable_autoformat = not vim.g.disable_autoformat - end - end, { - desc = "Toggle autoformat-on-save", - bang = true, - }) - ''; - }; -} diff --git a/home/programs/editors/neovim/plugins/default.nix b/home/programs/editors/neovim/plugins/default.nix deleted file mode 100644 index 9c695b5..0000000 --- a/home/programs/editors/neovim/plugins/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -_: { - imports = [ - ./editor/neotree.nix - ./editor/trouble.nix - ./editor/autoclose.nix - ./editor/bufferline.nix - ./editor/autosave.nix - ./editor/treesitter.nix - ./editor/guessindent.nix - ./editor/luasnip.nix - ./editor/cmp.nix - ./lsp/lsp.nix - ./lsp/conform.nix - ./misc/wakatime.nix - ./misc/direnv.nix - ./misc/presence.nix - ./misc/lazygit.nix - ./misc/vimbbye.nix - ./ui/lualine.nix - ./ui/mini.nix - ./ui/transparent.nix - ./ui/telescope.nix - ./ui/fidget.nix - ./ui/dashboard.nix - ./ui/toggleterm.nix - ./ui/whichkey.nix - ]; - programs.nixvim.plugins.web-devicons.enable = true; -} diff --git a/home/programs/editors/neovim/plugins/editor/autoclose.nix b/home/programs/editors/neovim/plugins/editor/autoclose.nix deleted file mode 100644 index 3802ad6..0000000 --- a/home/programs/editors/neovim/plugins/editor/autoclose.nix +++ /dev/null @@ -1,3 +0,0 @@ -_: { - programs.nixvim.plugins.nvim-autopairs.enable = true; -} diff --git a/home/programs/editors/neovim/plugins/editor/autosave.nix b/home/programs/editors/neovim/plugins/editor/autosave.nix deleted file mode 100644 index 68ad316..0000000 --- a/home/programs/editors/neovim/plugins/editor/autosave.nix +++ /dev/null @@ -1,3 +0,0 @@ -_: { - programs.nixvim.plugins.auto-save.enable = true; -} diff --git a/home/programs/editors/neovim/plugins/editor/bufferline.nix b/home/programs/editors/neovim/plugins/editor/bufferline.nix deleted file mode 100644 index 58807dc..0000000 --- a/home/programs/editors/neovim/plugins/editor/bufferline.nix +++ /dev/null @@ -1,17 +0,0 @@ -_: { - programs.nixvim.plugins.bufferline = { - enable = true; - settings = { - options = { - offsets = [ - { - filetype = "neo-tree"; - highlight = "Directory"; - text = "File Explorer"; - text_align = "center"; - } - ]; - }; - }; - }; -} diff --git a/home/programs/editors/neovim/plugins/editor/cmp.nix b/home/programs/editors/neovim/plugins/editor/cmp.nix deleted file mode 100644 index 18bd99b..0000000 --- a/home/programs/editors/neovim/plugins/editor/cmp.nix +++ /dev/null @@ -1,27 +0,0 @@ -_: { - programs.nixvim.plugins = { - cmp = { - enable = true; - autoEnableSources = true; - settings = { - sources = [ - {name = "nvim_lsp";} - {name = "path";} - {name = "buffer";} - {name = "luasnip";} - ]; - mapping = { - __raw = '' - cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = true }), - }) - ''; - }; - }; - }; - }; -} diff --git a/home/programs/editors/neovim/plugins/editor/guessindent.nix b/home/programs/editors/neovim/plugins/editor/guessindent.nix deleted file mode 100644 index 4a899f4..0000000 --- a/home/programs/editors/neovim/plugins/editor/guessindent.nix +++ /dev/null @@ -1,3 +0,0 @@ -_: { - programs.nixvim.plugins.guess-indent.enable = true; -} diff --git a/home/programs/editors/neovim/plugins/editor/luasnip.nix b/home/programs/editors/neovim/plugins/editor/luasnip.nix deleted file mode 100644 index f2edc8a..0000000 --- a/home/programs/editors/neovim/plugins/editor/luasnip.nix +++ /dev/null @@ -1,9 +0,0 @@ -_: { - programs.nixvim.plugins.luasnip = { - enable = true; - settings = { - enable_autosnippets = true; - store_selection_keys = ""; - }; - }; -} diff --git a/home/programs/editors/neovim/plugins/editor/neotree.nix b/home/programs/editors/neovim/plugins/editor/neotree.nix deleted file mode 100644 index d67a4f0..0000000 --- a/home/programs/editors/neovim/plugins/editor/neotree.nix +++ /dev/null @@ -1,14 +0,0 @@ -_: { - programs.nixvim.plugins.neo-tree = { - enable = true; - enableDiagnostics = true; - extraOptions = { - filesystem = { - filtered_items = { - visible = true; - hide_fotfiles = false; - }; - }; - }; - }; -} diff --git a/home/programs/editors/neovim/plugins/editor/treesitter.nix b/home/programs/editors/neovim/plugins/editor/treesitter.nix deleted file mode 100644 index baee549..0000000 --- a/home/programs/editors/neovim/plugins/editor/treesitter.nix +++ /dev/null @@ -1,36 +0,0 @@ -{pkgs, ...}: let - treesitter-nu-grammar = pkgs.tree-sitter.buildGrammar { - language = "nu"; - version = "0.0.0+rev=1561a94"; - src = pkgs.fetchFromGitHub { - owner = "nushell"; - repo = "tree-sitter-nu"; - rev = "1561a947a5505d373e11ca337898e048ac2e389e"; - hash = "sha256-RAAMBVov4q8b8MJZVlf1qwbLK8hE5AxPK1IV9TMCrTs="; - }; - meta.homepage = "https://github.com/nushell/tree-sitter-nu"; - }; -in { - programs.nixvim.plugins.treesitter = { - enable = true; - grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [ - bash - json - lua - markdown - nix - regex - toml - xml - yaml - rust - go - gomod - treesitter-nu-grammar - ]; - settings = { - highlight.enable = true; - indent.enable = false; - }; - }; -} diff --git a/home/programs/editors/neovim/plugins/editor/trouble.nix b/home/programs/editors/neovim/plugins/editor/trouble.nix deleted file mode 100644 index d20c93d..0000000 --- a/home/programs/editors/neovim/plugins/editor/trouble.nix +++ /dev/null @@ -1,8 +0,0 @@ -_: { - programs.nixvim.plugins.trouble = { - enable = true; - settings = { - auto_refresh = true; - }; - }; -} diff --git a/home/programs/editors/neovim/plugins/lsp/conform.nix b/home/programs/editors/neovim/plugins/lsp/conform.nix deleted file mode 100644 index 40f1d9a..0000000 --- a/home/programs/editors/neovim/plugins/lsp/conform.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - programs.nixvim.plugins.conform-nvim = { - enable = true; - settings = { - formatters_by_ft = { - nix = [ - [ - "alejandra" - ] - ]; - rust = [ - [ - "rustfmt" - ] - ]; - go = [ - [ - "gofmt" - ] - ]; - lua = [ - [ - "stylua" - ] - ]; - }; - format_on_save = '' - function(bufnr) - if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then - return - end - - if slow_format_filetypes[vim.bo[bufnr].filetype] then - return - end - - local function on_format(err) - if err and err:match("timeout$") then - slow_format_filetypes[vim.bo[bufnr].filetype] = true - end - end - - return { timeout_ms = 200, lsp_fallback = true }, on_format - end - ''; - format_after_save = '' - function(bufnr) - if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then - return - end - - if not slow_format_filetypes[vim.bo[bufnr].filetype] then - return - end - - return { lsp_fallback = true } - end - ''; - formatters = { - alejandra = { - commmand = "${lib.getExe pkgs.alejandra}"; - }; - rustfmt = { - commmand = "${lib.getExe pkgs.rustfmt}"; - }; - gofmt = { - commmand = "${lib.getExe pkgs.go}"; - }; - stylua = { - commmand = "${lib.getExe pkgs.stylua}"; - }; - }; - }; - }; -} diff --git a/home/programs/editors/neovim/plugins/lsp/lsp.nix b/home/programs/editors/neovim/plugins/lsp/lsp.nix deleted file mode 100644 index 18a05b3..0000000 --- a/home/programs/editors/neovim/plugins/lsp/lsp.nix +++ /dev/null @@ -1,43 +0,0 @@ -_: { - programs.nixvim.plugins = { - lsp-format.enable = true; - lsp-lines.enable = true; - lint = { - lintersByFt = { - nix = [ - "statix" - ]; - }; - linters = { - statix = { - cmd = ["statix"]; - }; - }; - }; - lsp = { - enable = true; - inlayHints = true; - servers = { - nil_ls = { - enable = true; - }; - rust_analyzer = { - enable = true; - autostart = true; - installCargo = true; - installRustc = true; - }; - gopls = { - enable = true; - autostart = true; - }; - nushell = { - enable = true; - }; - lua_ls = { - enable = true; - }; - }; - }; - }; -} diff --git a/home/programs/editors/neovim/plugins/misc/direnv.nix b/home/programs/editors/neovim/plugins/misc/direnv.nix deleted file mode 100644 index a597478..0000000 --- a/home/programs/editors/neovim/plugins/misc/direnv.nix +++ /dev/null @@ -1,3 +0,0 @@ -_: { - programs.nixvim.plugins.direnv.enable = true; -} diff --git a/home/programs/editors/neovim/plugins/misc/lazygit.nix b/home/programs/editors/neovim/plugins/misc/lazygit.nix deleted file mode 100644 index aa117a9..0000000 --- a/home/programs/editors/neovim/plugins/misc/lazygit.nix +++ /dev/null @@ -1,3 +0,0 @@ -_: { - programs.nixvim.plugins.lazygit.enable = true; -} diff --git a/home/programs/editors/neovim/plugins/misc/presence.nix b/home/programs/editors/neovim/plugins/misc/presence.nix deleted file mode 100644 index 02cf605..0000000 --- a/home/programs/editors/neovim/plugins/misc/presence.nix +++ /dev/null @@ -1,33 +0,0 @@ -{pkgs, ...}: { - programs.nixvim = { - extraPlugins = with pkgs.vimPlugins; [ - cord-nvim - ]; - extraConfigLua = '' - require('cord').setup { - timer = { - interval = 500, - }, - editor = { - tooltip = 'Neovim', - }, - display = { - show_time = true, - show_repository = true, - show_cursor_position = true, - }, - lsp = { - show_problem_count = true, - severity = 1, - scope = 'workspace', - }, - buttons = { - { - label = 'View Repository', - url = 'git', - }, - }, - } - ''; - }; -} diff --git a/home/programs/editors/neovim/plugins/misc/vimbbye.nix b/home/programs/editors/neovim/plugins/misc/vimbbye.nix deleted file mode 100644 index 3912a4d..0000000 --- a/home/programs/editors/neovim/plugins/misc/vimbbye.nix +++ /dev/null @@ -1,3 +0,0 @@ -_: { - programs.nixvim.plugins.vim-bbye.enable = true; -} diff --git a/home/programs/editors/neovim/plugins/misc/wakatime.nix b/home/programs/editors/neovim/plugins/misc/wakatime.nix deleted file mode 100644 index 019f83c..0000000 --- a/home/programs/editors/neovim/plugins/misc/wakatime.nix +++ /dev/null @@ -1,3 +0,0 @@ -_: { - programs.nixvim.plugins.wakatime.enable = true; -} diff --git a/home/programs/editors/neovim/plugins/ui/dashboard.nix b/home/programs/editors/neovim/plugins/ui/dashboard.nix deleted file mode 100644 index 35ddbe9..0000000 --- a/home/programs/editors/neovim/plugins/ui/dashboard.nix +++ /dev/null @@ -1,5 +0,0 @@ -_: { - programs.nixvim.plugins.dashboard = { - enable = true; - }; -} diff --git a/home/programs/editors/neovim/plugins/ui/fidget.nix b/home/programs/editors/neovim/plugins/ui/fidget.nix deleted file mode 100644 index 75b2647..0000000 --- a/home/programs/editors/neovim/plugins/ui/fidget.nix +++ /dev/null @@ -1,8 +0,0 @@ -_: { - programs.nixvim.plugins.fidget = { - enable = true; - notification.window = { - winblend = 0; - }; - }; -} diff --git a/home/programs/editors/neovim/plugins/ui/lualine.nix b/home/programs/editors/neovim/plugins/ui/lualine.nix deleted file mode 100644 index 4f5cdd6..0000000 --- a/home/programs/editors/neovim/plugins/ui/lualine.nix +++ /dev/null @@ -1,5 +0,0 @@ -_: { - programs.nixvim.plugins.lualine = { - enable = true; - }; -} diff --git a/home/programs/editors/neovim/plugins/ui/mini.nix b/home/programs/editors/neovim/plugins/ui/mini.nix deleted file mode 100644 index 298a2b0..0000000 --- a/home/programs/editors/neovim/plugins/ui/mini.nix +++ /dev/null @@ -1,5 +0,0 @@ -_: { - programs.nixvim.plugins.mini = { - enable = true; - }; -} diff --git a/home/programs/editors/neovim/plugins/ui/telescope.nix b/home/programs/editors/neovim/plugins/ui/telescope.nix deleted file mode 100644 index d3fa2e1..0000000 --- a/home/programs/editors/neovim/plugins/ui/telescope.nix +++ /dev/null @@ -1,5 +0,0 @@ -_: { - programs.nixvim.plugins.telescope = { - enable = true; - }; -} diff --git a/home/programs/editors/neovim/plugins/ui/toggleterm.nix b/home/programs/editors/neovim/plugins/ui/toggleterm.nix deleted file mode 100644 index 7aa832d..0000000 --- a/home/programs/editors/neovim/plugins/ui/toggleterm.nix +++ /dev/null @@ -1,13 +0,0 @@ -_: { - programs.nixvim.plugins.toggleterm = { - enable = true; - settings = { - direction = "float"; - float_opts = { - border = "curved"; - height = 30; - width = 130; - }; - }; - }; -} diff --git a/home/programs/editors/neovim/plugins/ui/transparent.nix b/home/programs/editors/neovim/plugins/ui/transparent.nix deleted file mode 100644 index 8006452..0000000 --- a/home/programs/editors/neovim/plugins/ui/transparent.nix +++ /dev/null @@ -1,12 +0,0 @@ -_: { - programs.nixvim.plugins.transparent = { - enable = true; - settings = { - extra_groups = [ - "NeoTreeNormal" - "NeoTreeNormalNC" - "NormalFloat" - ]; - }; - }; -} diff --git a/home/programs/editors/neovim/plugins/ui/whichkey.nix b/home/programs/editors/neovim/plugins/ui/whichkey.nix deleted file mode 100644 index 350c384..0000000 --- a/home/programs/editors/neovim/plugins/ui/whichkey.nix +++ /dev/null @@ -1,90 +0,0 @@ -_: { - programs.nixvim.plugins.which-key = { - enable = true; - settings = { - preset = "helix"; - replace = { - desc = [ - [ - "" - "SPACE" - ] - [ - "" - "SPACE" - ] - [ - "<[cC][rR]>" - "RETURN" - ] - [ - "<[tT][aA][bB]>" - "TAB" - ] - [ - "<[bB][sS]>" - "BACKSPACE" - ] - ]; - spec = [ - { - __unkeyed-1 = "b"; - group = "Buffers"; - icon = "󰓩 "; - } - { - __unkeyed = "c"; - group = "Codesnap"; - icon = "󰄄 "; - mode = "v"; - } - { - __unkeyed-1 = "bs"; - group = "Sort"; - icon = "󰒺 "; - } - { - __unkeyed-1 = [ - { - __unkeyed-1 = "f"; - group = "Normal Visual Group"; - } - { - __unkeyed-1 = "f"; - group = "Normal Visual Group in Group"; - } - ]; - mode = [ - "n" - "v" - ]; - } - { - __unkeyed-1 = "w"; - group = "windows"; - proxy = ""; - } - { - __unkeyed-1 = "cS"; - __unkeyed-2 = "CodeSnapSave"; - desc = "Save"; - mode = "v"; - } - { - __unkeyed-1 = "db"; - __unkeyed-2 = { - __raw = '' - function() - require("dap").toggle_breakpoint() - end - ''; - }; - desc = "Breakpoint toggle"; - mode = "n"; - silent = true; - } - ]; - }; - }; - }; -} diff --git a/home/programs/editors/neovim/themes/default.nix b/home/programs/editors/neovim/themes/default.nix deleted file mode 100644 index e6205b1..0000000 --- a/home/programs/editors/neovim/themes/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -_: { - imports = [./tokyonight.nix]; -} diff --git a/home/programs/editors/neovim/themes/tokyonight.nix b/home/programs/editors/neovim/themes/tokyonight.nix deleted file mode 100644 index fd59cd3..0000000 --- a/home/programs/editors/neovim/themes/tokyonight.nix +++ /dev/null @@ -1,8 +0,0 @@ -_: { - programs.nixvim.colorschemes.tokyonight = { - enable = true; - settings = { - transparent = true; - }; - }; -}