Compare commits
No commits in common. "d6b95fdef6c04fcb3c5735772beb36a6a359befb" and "31012a6274a7242396786a7d3abbb9cbc9d3f86a" have entirely different histories.
d6b95fdef6
...
31012a6274
7 changed files with 38 additions and 64 deletions
17
flake.lock
17
flake.lock
|
@ -319,22 +319,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hmts-nvim": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1691525513,
|
|
||||||
"narHash": "sha256-il5m+GlNt0FzZjefl1q8ZxWHg0+gQps0vigt+eoIy8A=",
|
|
||||||
"owner": "calops",
|
|
||||||
"repo": "hmts.nvim",
|
|
||||||
"rev": "594dd17c870afb7f6517723c8963f6eb144e3c0d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "calops",
|
|
||||||
"repo": "hmts.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -801,7 +785,6 @@
|
||||||
"arkenfox-userjs": "arkenfox-userjs",
|
"arkenfox-userjs": "arkenfox-userjs",
|
||||||
"asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver",
|
"asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"hmts-nvim": "hmts-nvim",
|
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"hypr-contrib": "hypr-contrib",
|
"hypr-contrib": "hypr-contrib",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
|
|
|
@ -44,9 +44,6 @@
|
||||||
telekasten-nvim.flake = false;
|
telekasten-nvim.flake = false;
|
||||||
telekasten-nvim.url = "github:renerocksai/telekasten.nvim";
|
telekasten-nvim.url = "github:renerocksai/telekasten.nvim";
|
||||||
|
|
||||||
hmts-nvim.flake = false;
|
|
||||||
hmts-nvim.url = "github:calops/hmts.nvim";
|
|
||||||
|
|
||||||
# Hyprland
|
# Hyprland
|
||||||
hypr-contrib.url = "github:hyprwm/contrib";
|
hypr-contrib.url = "github:hyprwm/contrib";
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
|
|
|
@ -50,22 +50,22 @@ in
|
||||||
${exportedVariables}
|
${exportedVariables}
|
||||||
'';
|
'';
|
||||||
functions = {
|
functions = {
|
||||||
gi = ''
|
gi = with pkgs; ''
|
||||||
set url https://www.gitignore.io/api
|
set url https://www.gitignore.io/api
|
||||||
|
|
||||||
if test (count $argv) -eq 0
|
if test (count $argv) -eq 0
|
||||||
set choice ( curl -sL $url/list \
|
set choice ( curl -sL $url/list \
|
||||||
| string split "," \
|
| string split "," \
|
||||||
| ${getExe pkgs.fzf} -m \
|
| ${fzf}/bin/fzf -m \
|
||||||
| string join "," )
|
| string join "," )
|
||||||
else
|
else
|
||||||
set choice (string join "," $argv[1..])
|
set choice (string join "," $argv[1..])
|
||||||
end
|
end
|
||||||
|
|
||||||
if ${getExe pkgs.gum} confirm "Overwrite current .gitignore?"
|
if ${gum}/bin/gum confirm "Overwrite current .gitignore?"
|
||||||
${getExe pkgs.curl} -sL $url/$choice > .gitignore
|
${curl}/bin/curl -sL $url/$choice > .gitignore
|
||||||
else
|
else
|
||||||
${getExe pkgs.curl} -sL $url/$choice >> .gitignore
|
${curl}/bin/curl -sL $url/$choice >> .gitignore
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
fish_greeting = "";
|
fish_greeting = "";
|
||||||
|
|
|
@ -12,8 +12,14 @@ let
|
||||||
id = x: x;
|
id = x: x;
|
||||||
listToString = sep: f: list: ''{ ${concatStringsSep sep (map f list)} }'';
|
listToString = sep: f: list: ''{ ${concatStringsSep sep (map f list)} }'';
|
||||||
listToStringOneLine = listToString ", ";
|
listToStringOneLine = listToString ", ";
|
||||||
listToStringMultiLine' = listToString ",\n" id;
|
listToStringMultiLine = listToString ",\n";
|
||||||
keybinding = { key, cmd, func, mode, desc }:
|
keybinding =
|
||||||
|
{ key
|
||||||
|
, cmd
|
||||||
|
, func
|
||||||
|
, mode
|
||||||
|
, desc
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cmdString =
|
cmdString =
|
||||||
if cmd != null
|
if cmd != null
|
||||||
|
@ -24,29 +30,39 @@ let
|
||||||
then func
|
then func
|
||||||
else abort "Either cmd or function must be set"
|
else abort "Either cmd or function must be set"
|
||||||
);
|
);
|
||||||
descString = optionalString (desc != null) "desc = ${quote desc},";
|
|
||||||
in
|
in
|
||||||
''{ ${quote key}, ${cmdString}, mode = ${quote mode}, ${descString} }'';
|
''{ ${quote key}, ${cmdString}, mode = ${quote mode}, ${optionalString (desc != null) "desc = ${quote desc},"} }'';
|
||||||
lazySpecFromPlugin =
|
lazySpecFromPlugin =
|
||||||
{ plugin, dependencies, init, conf, lazy, event, enabled, cmd, ft, priority, keys }:
|
{ plugin
|
||||||
listToStringMultiLine'
|
, dependencies
|
||||||
|
, init
|
||||||
|
, conf
|
||||||
|
, lazy
|
||||||
|
, event
|
||||||
|
, enabled
|
||||||
|
, cmd
|
||||||
|
, ft
|
||||||
|
, priority
|
||||||
|
, keys
|
||||||
|
}:
|
||||||
|
listToStringMultiLine id
|
||||||
([
|
([
|
||||||
"dir = ${quote plugin}"
|
"dir = ${quote plugin}"
|
||||||
"name = ${quote (getName plugin)}"
|
"name = ${quote (getName plugin)}"
|
||||||
]
|
]
|
||||||
++ (optional (lazy != null) "lazy = ${boolToString lazy}")
|
++ (optional (lazy != null) "lazy = ${boolToString lazy}")
|
||||||
++ (optional (!enabled) "enabled = ${boolToString enabled}")
|
++ (optional (!enabled) "enabled = ${boolToString enabled}")
|
||||||
++ (optional (dependencies != [ ]) "dependencies = ${listToStringMultiLine' (map lazySpecFromPlugin dependencies)}")
|
++ (optional (dependencies != [ ]) "dependencies = ${listToStringMultiLine id (map lazySpecFromPlugin dependencies)}")
|
||||||
++ (optional (init != null) "init = function(plugin)\n${toString init}\nend")
|
++ (optional (init != null) "init = function(plugin)\n${toString init}\nend")
|
||||||
++ (optional (conf != null) "config = function(plugin, opts)\n${toString conf}\nend")
|
++ (optional (conf != null) "config = function(plugin, opts)\n${toString conf}\nend")
|
||||||
++ (optional (keys != [ ]) "keys = ${listToStringMultiLine' (map keybinding keys)}")
|
++ (optional (keys != [ ]) "keys = ${listToStringMultiLine id (map keybinding keys)}")
|
||||||
++ (optional (event != [ ]) "event = ${listToStringOneLine quote event}")
|
++ (optional (event != [ ]) "event = ${listToStringOneLine quote event}")
|
||||||
++ (optional (cmd != [ ]) "cmd = ${listToStringOneLine quote cmd}")
|
++ (optional (cmd != [ ]) "cmd = ${listToStringOneLine quote cmd}")
|
||||||
++ (optional (ft != [ ]) "ft = ${listToStringOneLine quote ft}")
|
++ (optional (ft != [ ]) "ft = ${listToStringOneLine quote ft}")
|
||||||
++ (optional (priority != null) "priority = ${toString priority}")
|
++ (optional (priority != null) "priority = ${toString priority}")
|
||||||
);
|
);
|
||||||
lazySpecs = listToStringMultiLine' (map lazySpecFromPlugin cfg.plugins);
|
lazySpecs = listToStringMultiLine id (map lazySpecFromPlugin cfg.plugins);
|
||||||
lazy = /* lua */ ''
|
lazy = ''
|
||||||
require("lazy").setup(${lazySpecs})
|
require("lazy").setup(${lazySpecs})
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
|
|
|
@ -47,7 +47,7 @@ with builtins;
|
||||||
{ key = "<leader>st"; cmd = "<cmd>TodoTelescope<cr>"; desc = "Todo"; }
|
{ key = "<leader>st"; cmd = "<cmd>TodoTelescope<cr>"; desc = "Todo"; }
|
||||||
{
|
{
|
||||||
key = "[q";
|
key = "[q";
|
||||||
func = /* lua */ ''function()
|
func = ''function()
|
||||||
if require("trouble").is_open() then
|
if require("trouble").is_open() then
|
||||||
require("trouble").previous({ skip_groups = true, jump = true })
|
require("trouble").previous({ skip_groups = true, jump = true })
|
||||||
else
|
else
|
||||||
|
@ -58,7 +58,7 @@ with builtins;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
key = "]q";
|
key = "]q";
|
||||||
func = /* lua */ ''function()
|
func = ''function()
|
||||||
if require("trouble").is_open() then
|
if require("trouble").is_open() then
|
||||||
require("trouble").next({ skip_groups = true, jump = true })
|
require("trouble").next({ skip_groups = true, jump = true })
|
||||||
else
|
else
|
||||||
|
@ -200,7 +200,7 @@ with builtins;
|
||||||
{
|
{
|
||||||
plugin = comment-nvim;
|
plugin = comment-nvim;
|
||||||
event = [ "BufReadPost" "BufNewFile" ];
|
event = [ "BufReadPost" "BufNewFile" ];
|
||||||
conf = /* lua */ ''
|
conf = ''
|
||||||
require("Comment").setup()
|
require("Comment").setup()
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -243,14 +243,14 @@ with builtins;
|
||||||
{
|
{
|
||||||
plugin = nvim-surround;
|
plugin = nvim-surround;
|
||||||
event = [ "BufReadPost" "BufNewFile" ];
|
event = [ "BufReadPost" "BufNewFile" ];
|
||||||
conf = /* lua */ ''
|
conf = ''
|
||||||
require("nvim-surround").setup({})
|
require("nvim-surround").setup({})
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = nvim-treesitter-context;
|
plugin = nvim-treesitter-context;
|
||||||
event = [ "BufReadPost" "BufNewFile" ];
|
event = [ "BufReadPost" "BufNewFile" ];
|
||||||
conf = /* lua */ ''
|
conf = ''
|
||||||
require("treesitter-context").setup({})
|
require("treesitter-context").setup({})
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -258,9 +258,5 @@ with builtins;
|
||||||
plugin = dressing-nvim;
|
plugin = dressing-nvim;
|
||||||
event = [ "VeryLazy" ];
|
event = [ "VeryLazy" ];
|
||||||
}
|
}
|
||||||
{
|
|
||||||
plugin = hmts-nvim;
|
|
||||||
ft = [ "nix" ];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ capabilities.textDocument.foldingRange = {
|
||||||
require("ufo").setup()
|
require("ufo").setup()
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local on_attach_def = function(client, bufnr)
|
local on_attach_def = function(_, bufnr)
|
||||||
require("which-key").register({
|
require("which-key").register({
|
||||||
K = { vim.lsp.buf.hover, "Hover" },
|
K = { vim.lsp.buf.hover, "Hover" },
|
||||||
["<leader>"] = {
|
["<leader>"] = {
|
||||||
|
@ -71,13 +71,7 @@ local on_attach_def = function(client, bufnr)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
t = {
|
t = {
|
||||||
l = { lsp_lines.toggle, "LSP lines" },
|
l = { lsp_lines.toggle, "Lsp lines" },
|
||||||
i = {
|
|
||||||
function()
|
|
||||||
vim.lsp.inlay_hint(bufnr, nil)
|
|
||||||
end,
|
|
||||||
"LSP inlay hints",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
g = {
|
g = {
|
||||||
|
@ -105,12 +99,6 @@ local on_attach_def = function(client, bufnr)
|
||||||
d = { vim.diagnostic.goto_next, "Next diagnostic" },
|
d = { vim.diagnostic.goto_next, "Next diagnostic" },
|
||||||
},
|
},
|
||||||
}, { buffer = bufnr, silent = true })
|
}, { buffer = bufnr, silent = true })
|
||||||
|
|
||||||
if client.server_capabilities.inlayHintProvider then
|
|
||||||
vim.defer_fn(function()
|
|
||||||
vim.lsp.inlay_hint(bufnr, true)
|
|
||||||
end, 1000)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local lspconfig_default_options = {
|
local lspconfig_default_options = {
|
||||||
|
|
|
@ -21,11 +21,5 @@ with lib.my;
|
||||||
version = mkVersionInput inputs.telekasten-nvim;
|
version = mkVersionInput inputs.telekasten-nvim;
|
||||||
src = inputs.telekasten-nvim;
|
src = inputs.telekasten-nvim;
|
||||||
};
|
};
|
||||||
|
|
||||||
hmts-nvim = prev.vimUtils.buildVimPluginFrom2Nix {
|
|
||||||
pname = "hmts-nvim";
|
|
||||||
version = mkVersionInput inputs.hmts-nvim;
|
|
||||||
src = inputs.hmts-nvim;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue