vimPlugins.kulala-nvim: fix (#474451)
This commit is contained in:
@@ -127,6 +127,7 @@
|
||||
sad,
|
||||
# tv.nvim dependency
|
||||
television,
|
||||
tree-sitter,
|
||||
}:
|
||||
self: super:
|
||||
let
|
||||
@@ -1558,21 +1559,34 @@ assertNoAdditions {
|
||||
];
|
||||
};
|
||||
|
||||
kulala-nvim = super.kulala-nvim.overrideAttrs {
|
||||
dependencies = with self; [
|
||||
nvim-treesitter
|
||||
nvim-treesitter-parsers.http
|
||||
];
|
||||
buildInputs = [ curl ];
|
||||
postPatch = ''
|
||||
substituteInPlace lua/kulala/config/defaults.lua \
|
||||
--replace-fail 'curl_path = "curl"' 'curl_path = "${lib.getExe curl}"'
|
||||
'';
|
||||
nvimSkipModules = [
|
||||
# Requires some extra work to get CLI working in nixpkgs
|
||||
"cli.kulala_cli"
|
||||
];
|
||||
};
|
||||
kulala-nvim = super.kulala-nvim.overrideAttrs (
|
||||
old:
|
||||
let
|
||||
kulala-http-grammar = neovimUtils.grammarToPlugin (
|
||||
tree-sitter.buildGrammar {
|
||||
inherit (old) version src meta;
|
||||
language = "kulala_http";
|
||||
location = "lua/tree-sitter";
|
||||
generate = false;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
dependencies = [ kulala-http-grammar ];
|
||||
buildInputs = [ curl ];
|
||||
|
||||
patches = [ ./patches/kulala-nvim/do-not-install-grammar.patch ];
|
||||
postPatch = ''
|
||||
substituteInPlace lua/kulala/config/defaults.lua \
|
||||
--replace-fail 'curl_path = "curl"' 'curl_path = "${lib.getExe curl}"'
|
||||
'';
|
||||
|
||||
nvimSkipModules = [
|
||||
# Requires some extra work to get CLI working in nixpkgs
|
||||
"cli.kulala_cli"
|
||||
];
|
||||
}
|
||||
);
|
||||
|
||||
lazydocker-nvim = super.lazydocker-nvim.overrideAttrs {
|
||||
runtimeDeps = [
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
diff --git a/lua/kulala/config/init.lua b/lua/kulala/config/init.lua
|
||||
index 7298f95..d781a12 100644
|
||||
--- a/lua/kulala/config/init.lua
|
||||
+++ b/lua/kulala/config/init.lua
|
||||
@@ -122,6 +122,10 @@ local function setup_treesitter_master()
|
||||
end
|
||||
|
||||
local function set_kulala_parser()
|
||||
+ assert(vim.treesitter.language.add("kulala_http"))
|
||||
+ vim.treesitter.language.register("kulala_http", { "http", "rest" })
|
||||
+ do return end
|
||||
+
|
||||
local parsers = vim.F.npcall(require, "nvim-treesitter.parsers")
|
||||
|
||||
if not parsers then
|
||||
Reference in New Issue
Block a user