mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-30 00:26:45 +00:00
Compare commits
1 commit
2b5eec5e4b
...
9637433544
Author | SHA1 | Date | |
---|---|---|---|
9637433544 |
9 changed files with 30 additions and 129 deletions
|
@ -220,7 +220,6 @@ To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
|
||||||
|
|
||||||
[ts-error-translator.nvim]: https://github.com/dmmulroy/ts-error-translator.nvim
|
[ts-error-translator.nvim]: https://github.com/dmmulroy/ts-error-translator.nvim
|
||||||
[credo]: https://github.com/rrrene/credo
|
[credo]: https://github.com/rrrene/credo
|
||||||
[tiny-devicons-auto-colors]: https://github.com/rachartier/tiny-devicons-auto-colors.nvim
|
|
||||||
|
|
||||||
- Add `deno fmt` as the default Markdown formatter. This will be enabled
|
- Add `deno fmt` as the default Markdown formatter. This will be enabled
|
||||||
automatically if you have autoformatting enabled, but can be disabled manually
|
automatically if you have autoformatting enabled, but can be disabled manually
|
||||||
|
@ -289,9 +288,6 @@ To migrate to `nixfmt`, simply change `vim.languages.nix.format.type` to
|
||||||
- Add combined nvf configuration (`config.vim`) into the final package's
|
- Add combined nvf configuration (`config.vim`) into the final package's
|
||||||
passthru as `passthru.neovimConfiguration` for easier debugging.
|
passthru as `passthru.neovimConfiguration` for easier debugging.
|
||||||
|
|
||||||
- Add support for [tiny-devicons-auto-colors] under
|
|
||||||
`vim.visuals.tiny-devicons-auto-colors`
|
|
||||||
|
|
||||||
[ppenguin](https://github.com/ppenguin):
|
[ppenguin](https://github.com/ppenguin):
|
||||||
|
|
||||||
- Telescope:
|
- Telescope:
|
||||||
|
|
17
flake.lock
17
flake.lock
|
@ -1790,22 +1790,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"plugin-tiny-devicons-auto-colors": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1724403745,
|
|
||||||
"narHash": "sha256-Ndkbvxn/x7+fxEYD7JIygqUiItuhoY+4+DaL/pJGKdc=",
|
|
||||||
"owner": "rachartier",
|
|
||||||
"repo": "tiny-devicons-auto-colors.nvim",
|
|
||||||
"rev": "a39fa4c92268832f6034306793b8acbfec2a7549",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "rachartier",
|
|
||||||
"repo": "tiny-devicons-auto-colors.nvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"plugin-todo-comments": {
|
"plugin-todo-comments": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -2128,7 +2112,6 @@
|
||||||
"plugin-sqls-nvim": "plugin-sqls-nvim",
|
"plugin-sqls-nvim": "plugin-sqls-nvim",
|
||||||
"plugin-tabular": "plugin-tabular",
|
"plugin-tabular": "plugin-tabular",
|
||||||
"plugin-telescope": "plugin-telescope",
|
"plugin-telescope": "plugin-telescope",
|
||||||
"plugin-tiny-devicons-auto-colors": "plugin-tiny-devicons-auto-colors",
|
|
||||||
"plugin-todo-comments": "plugin-todo-comments",
|
"plugin-todo-comments": "plugin-todo-comments",
|
||||||
"plugin-toggleterm-nvim": "plugin-toggleterm-nvim",
|
"plugin-toggleterm-nvim": "plugin-toggleterm-nvim",
|
||||||
"plugin-tokyonight": "plugin-tokyonight",
|
"plugin-tokyonight": "plugin-tokyonight",
|
||||||
|
|
|
@ -468,11 +468,6 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
plugin-tiny-devicons-auto-colors = {
|
|
||||||
url = "github:rachartier/tiny-devicons-auto-colors.nvim";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
plugin-gitsigns-nvim = {
|
plugin-gitsigns-nvim = {
|
||||||
url = "github:lewis6991/gitsigns.nvim";
|
url = "github:lewis6991/gitsigns.nvim";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
|
|
@ -128,10 +128,9 @@ in {
|
||||||
# will return the configuration in full.
|
# will return the configuration in full.
|
||||||
passthru.neovimConfig = vimOptions;
|
passthru.neovimConfig = vimOptions;
|
||||||
|
|
||||||
meta =
|
meta = {
|
||||||
neovim-wrapped.meta
|
description = "Wrapped version of Neovim with additional helper scripts";
|
||||||
// {
|
mainProgram = "nvim";
|
||||||
description = "Wrapped Neovim package with helper scripts to print the config (path)";
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,33 +4,13 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) attrNames;
|
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.lists) isList;
|
inherit (lib.lists) isList;
|
||||||
inherit (lib.types) either listOf package str enum;
|
inherit (lib.types) either listOf package str;
|
||||||
inherit (lib.nvim.lua) expToLua;
|
inherit (lib.nvim.lua) expToLua;
|
||||||
inherit (lib.nvim.types) mkGrammarOption;
|
inherit (lib.nvim.types) mkGrammarOption;
|
||||||
|
|
||||||
defaultServer = "zls";
|
|
||||||
servers = {
|
|
||||||
zls = {
|
|
||||||
package = pkgs.zls;
|
|
||||||
internalFormatter = true;
|
|
||||||
lspConfig = ''
|
|
||||||
lspconfig.zls.setup {
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = default_on_attach,
|
|
||||||
cmd = ${
|
|
||||||
if isList cfg.lsp.package
|
|
||||||
then expToLua cfg.lsp.package
|
|
||||||
else "{'${cfg.lsp.package}/bin/zls'}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
cfg = config.vim.languages.zig;
|
cfg = config.vim.languages.zig;
|
||||||
in {
|
in {
|
||||||
options.vim.languages.zig = {
|
options.vim.languages.zig = {
|
||||||
|
@ -42,19 +22,20 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = mkEnableOption "Zig LSP support" // {default = config.vim.languages.enableLSP;};
|
enable = mkEnableOption "Zig LSP support (zls)" // {default = config.vim.languages.enableLSP;};
|
||||||
|
|
||||||
server = mkOption {
|
|
||||||
type = enum (attrNames servers);
|
|
||||||
default = defaultServer;
|
|
||||||
description = "Zig LSP server to use";
|
|
||||||
};
|
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
description = "ZLS package, or the command to run as a list of strings";
|
description = "ZLS package, or the command to run as a list of strings";
|
||||||
|
example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]'';
|
||||||
type = either package (listOf str);
|
type = either package (listOf str);
|
||||||
default = pkgs.zls;
|
default = pkgs.zls;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zigPackage = mkOption {
|
||||||
|
description = "Zig package used by ZLS";
|
||||||
|
type = package;
|
||||||
|
default = pkgs.zig;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
@ -65,7 +46,23 @@ in {
|
||||||
|
|
||||||
(mkIf cfg.lsp.enable {
|
(mkIf cfg.lsp.enable {
|
||||||
vim.lsp.lspconfig.enable = true;
|
vim.lsp.lspconfig.enable = true;
|
||||||
vim.lsp.lspconfig.sources.zig-lsp = servers.${cfg.lsp.server}.lspConfig;
|
vim.lsp.lspconfig.sources.zig-lsp = ''
|
||||||
|
lspconfig.zls.setup {
|
||||||
|
capabilities = capabilities,
|
||||||
|
on_attach=default_on_attach,
|
||||||
|
cmd = ${
|
||||||
|
if isList cfg.lsp.package
|
||||||
|
then expToLua cfg.lsp.package
|
||||||
|
else ''{"${cfg.lsp.package}/bin/zls"}''
|
||||||
|
},
|
||||||
|
settings = {
|
||||||
|
["zls"] = {
|
||||||
|
zig_exe_path = "${cfg.lsp.zigPackage}/bin/zig",
|
||||||
|
zig_lib_path = "${cfg.lsp.zigPackage}/lib/zig",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,5 @@ in {
|
||||||
./nvim-cursorline
|
./nvim-cursorline
|
||||||
./nvim-scrollbar
|
./nvim-scrollbar
|
||||||
./nvim-web-devicons
|
./nvim-web-devicons
|
||||||
./tiny-devicons-auto-colors
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib.modules) mkIf;
|
|
||||||
inherit (lib.nvim.lua) toLuaObject;
|
|
||||||
inherit (lib.nvim.dag) entryAnywhere;
|
|
||||||
|
|
||||||
cfg = config.vim.visuals.tiny-devicons-auto-colors;
|
|
||||||
in {
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
vim = {
|
|
||||||
startPlugins = ["tiny-devicons-auto-colors" "nvim-web-devicons"];
|
|
||||||
|
|
||||||
pluginRC.tiny-devicons-auto-colors = entryAnywhere ''
|
|
||||||
require("tiny-devicons-auto-colors").setup(${toLuaObject cfg.setupOpts})
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./config.nix
|
|
||||||
./tiny-devicons-auto-colors.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
{lib, ...}: let
|
|
||||||
inherit (lib.options) mkOption mkEnableOption;
|
|
||||||
inherit (lib.types) int float;
|
|
||||||
inherit (lib.generators) mkLuaInline;
|
|
||||||
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
|
|
||||||
in {
|
|
||||||
options.vim.visuals.tiny-devicons-auto-colors = {
|
|
||||||
enable = mkEnableOption "alternative nvim-web-devicons icon colors [tiny-devicons-auto-colors]";
|
|
||||||
|
|
||||||
setupOpts = mkPluginSetupOption "tiny-devicons-auto-colors" {
|
|
||||||
factors = {
|
|
||||||
lightness = mkOption {
|
|
||||||
type = float;
|
|
||||||
default = 1.76;
|
|
||||||
description = "Lightness factor of icons";
|
|
||||||
};
|
|
||||||
|
|
||||||
chroma = mkOption {
|
|
||||||
type = int;
|
|
||||||
default = 1;
|
|
||||||
description = "Chroma factor of icons";
|
|
||||||
};
|
|
||||||
|
|
||||||
hue = mkOption {
|
|
||||||
type = float;
|
|
||||||
default = 1.25;
|
|
||||||
description = "Hue factor of icons";
|
|
||||||
};
|
|
||||||
|
|
||||||
cache = {
|
|
||||||
enabled = mkEnableOption "caching of icon colors. This will greatly improve performance" // {default = true;};
|
|
||||||
path = mkOption {
|
|
||||||
type = luaInline;
|
|
||||||
default = mkLuaInline "vim.fn.stdpath(\"cache\") .. \"/tiny-devicons-auto-colors-cache.json\"";
|
|
||||||
description = "Path to the cache file";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue