mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-19 08:38:43 +00:00
Compare commits
4 commits
96f3524a4d
...
385793a2ea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
385793a2ea | ||
|
|
e08fd4dc9f | ||
|
|
b00b999f1d | ||
|
|
59f89ff96f |
4 changed files with 11 additions and 6 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
{lib}: let
|
{lib}: let
|
||||||
inherit (builtins) isString getAttr;
|
inherit (builtins) isString getAttr;
|
||||||
inherit (lib.options) mkOption;
|
inherit (lib.options) mkOption;
|
||||||
inherit (lib.types) listOf bool str submodule attrsOf anything either nullOr;
|
inherit (lib.types) listOf bool str submodule attrsOf anything either nullOr oneOf;
|
||||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||||
inherit (lib.nvim.types) luaInline;
|
inherit (lib.nvim.types) luaInline;
|
||||||
in {
|
in {
|
||||||
|
|
@ -62,7 +62,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
cmd = mkOption {
|
cmd = mkOption {
|
||||||
type = nullOr (listOf str);
|
type = nullOr (listOf (oneOf [str luaInline]));
|
||||||
default = null;
|
default = null;
|
||||||
description = "Command used to start the LSP server";
|
description = "Command used to start the LSP server";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
inherit (lib.attrsets) mapAttrsToList attrNames filterAttrs;
|
inherit (lib.attrsets) mapAttrsToList attrNames filterAttrs;
|
||||||
inherit (lib.generators) mkLuaInline;
|
inherit (lib.generators) mkLuaInline;
|
||||||
inherit (lib.nvim.languages) lspOptions;
|
inherit (lib.nvim.languages) lspOptions;
|
||||||
inherit (lib.nvim.dag) entryAfter;
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
inherit (lib.nvim.lua) toLuaObject;
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
|
||||||
cfg = config.vim.lsp;
|
cfg = config.vim.lsp;
|
||||||
|
|
@ -82,8 +82,7 @@ in {
|
||||||
|
|
||||||
(mkIf (cfg.servers != {}) {
|
(mkIf (cfg.servers != {}) {
|
||||||
# Enable lspconfig in order to merge in the predefined opts
|
# Enable lspconfig in order to merge in the predefined opts
|
||||||
vim.lsp.lspconfig.enable = true;
|
vim.luaConfigRC.lsp-servers = entryAnywhere ''
|
||||||
vim.luaConfigRC.lsp-servers = entryAfter ["lspconfig"] ''
|
|
||||||
-- Individual LSP configurations managed by nvf.
|
-- Individual LSP configurations managed by nvf.
|
||||||
${concatLines lspConfigurations}
|
${concatLines lspConfigurations}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,9 @@
|
||||||
servers = {
|
servers = {
|
||||||
marksman = {
|
marksman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
cmd = ["${pkgs.marksman}/bin/marksman" "server"];
|
cmd = [(getExe pkgs.marksman) "server"];
|
||||||
|
filetypes = ["markdown" "markdown.mdx"];
|
||||||
|
root_markers = [".marksman.toml" ".git"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,8 @@
|
||||||
settings = {
|
settings = {
|
||||||
nil = formattingCmd;
|
nil = formattingCmd;
|
||||||
};
|
};
|
||||||
|
filetypes = ["nix"];
|
||||||
|
root_markers = [".git" "flake.nix"];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixd = {
|
nixd = {
|
||||||
|
|
@ -49,6 +51,8 @@
|
||||||
settings = {
|
settings = {
|
||||||
nixd = formattingCmd;
|
nixd = formattingCmd;
|
||||||
};
|
};
|
||||||
|
filetypes = ["nix"];
|
||||||
|
root_markers = [".git" "flake.nix"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue