From 8d83dc54575d45516f7e963fc5504f907feede17 Mon Sep 17 00:00:00 2001 From: Katie Janzen Date: Sat, 23 Nov 2024 16:45:03 -0600 Subject: [PATCH] vimPlugins.tsc-nvim: init at 2024-08-14 (#357769) * vimPlugins.tsc-nvim: init at 2024-08-14 --------- Co-authored-by: 347Online | Katie Janzen <"katiejanzen@347online.me"> --- pkgs/applications/editors/vim/plugins/generated.nix | 12 ++++++++++++ pkgs/applications/editors/vim/plugins/overrides.nix | 9 +++++++++ .../vim/plugins/patches/tsc.nvim/fix-path.patch | 13 +++++++++++++ .../editors/vim/plugins/vim-plugin-names | 1 + 4 files changed, 35 insertions(+) create mode 100644 pkgs/applications/editors/vim/plugins/patches/tsc.nvim/fix-path.patch diff --git a/pkgs/applications/editors/vim/plugins/generated.nix b/pkgs/applications/editors/vim/plugins/generated.nix index fbbcb1b8eba5..3756e70ad068 100644 --- a/pkgs/applications/editors/vim/plugins/generated.nix +++ b/pkgs/applications/editors/vim/plugins/generated.nix @@ -12823,6 +12823,18 @@ final: prev: meta.homepage = "https://github.com/folke/ts-comments.nvim/"; }; + tsc-nvim = buildVimPlugin { + pname = "tsc.nvim"; + version = "2024-08-14"; + src = fetchFromGitHub { + owner = "dmmulroy"; + repo = "tsc.nvim"; + rev = "82c37ebfe45d30763db6f45b54e18f1e485bb52c"; + sha256 = "14fa5w73bxpvwy3jm25mmx08l2v6c1w35ca8gc61mayxja55d4ls"; + }; + meta.homepage = "https://github.com/dmmulroy/tsc.nvim/"; + }; + tslime-vim = buildVimPlugin { pname = "tslime.vim"; version = "2020-09-09"; diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 2a114eb3bfee..080ada46b9ed 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -57,6 +57,7 @@ taskwarrior3, tmux, tup, + typescript, vim, which, xkb-switch, @@ -2610,6 +2611,14 @@ in nvimRequireCheck = "todo-comments"; }; + tsc-nvim = super.tsc-nvim.overrideAttrs { + patches = [ ./patches/tsc.nvim/fix-path.patch ]; + + postPatch = '' + substituteInPlace lua/tsc/utils.lua --replace '@tsc@' ${typescript}/bin/tsc + ''; + }; + tssorter-nvim = super.tssorter-nvim.overrideAttrs { dependencies = with self; [ nvim-treesitter ]; nvimRequireCheck = "tssorter"; diff --git a/pkgs/applications/editors/vim/plugins/patches/tsc.nvim/fix-path.patch b/pkgs/applications/editors/vim/plugins/patches/tsc.nvim/fix-path.patch new file mode 100644 index 000000000000..a311d42e4b7d --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/patches/tsc.nvim/fix-path.patch @@ -0,0 +1,13 @@ +diff --git a/lua/tsc/utils.lua b/lua/tsc/utils.lua +index 6433bcb..75760f9 100644 +--- a/lua/tsc/utils.lua ++++ b/lua/tsc/utils.lua +@@ -16,7 +16,7 @@ M.find_tsc_bin = function() + return node_modules_tsc_binary + end + +- return "tsc" ++ return "@tsc@" + end + + --- @param run_mono_repo boolean diff --git a/pkgs/applications/editors/vim/plugins/vim-plugin-names b/pkgs/applications/editors/vim/plugins/vim-plugin-names index 61248af3c14a..32aa554f295d 100644 --- a/pkgs/applications/editors/vim/plugins/vim-plugin-names +++ b/pkgs/applications/editors/vim/plugins/vim-plugin-names @@ -1065,6 +1065,7 @@ https://github.com/folke/trouble.nvim/,, https://github.com/Pocco81/true-zen.nvim/,, https://github.com/tesaguri/trust.vim/,HEAD, https://github.com/folke/ts-comments.nvim/,HEAD, +https://github.com/dmmulroy/tsc.nvim/,HEAD, https://github.com/jgdavey/tslime.vim/,, https://github.com/mtrajano/tssorter.nvim/,HEAD, https://github.com/Quramy/tsuquyomi/,,