mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-04 19:05:55 +00:00
Merge 34f81b7595 into 92854bd0ea
This commit is contained in:
commit
c4763aedc0
3 changed files with 60 additions and 2 deletions
|
|
@ -174,6 +174,9 @@
|
||||||
|
|
||||||
- Added Makefile support via `languages.make`.
|
- Added Makefile support via `languages.make`.
|
||||||
|
|
||||||
|
- Added Debugging support to `languages.odin` with
|
||||||
|
[nvim-dap-odin](https://github.com/NANDquark/nvim-dap-odin).
|
||||||
|
|
||||||
[vagahbond](https://github.com/vagahbond): [codewindow.nvim]:
|
[vagahbond](https://github.com/vagahbond): [codewindow.nvim]:
|
||||||
https://github.com/gorbit99/codewindow.nvim
|
https://github.com/gorbit99/codewindow.nvim
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,15 @@
|
||||||
inherit (builtins) attrNames;
|
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.types) enum;
|
inherit (lib.types) enum package;
|
||||||
|
inherit (lib.nvim.dag) entryAfter;
|
||||||
inherit (lib.meta) getExe;
|
inherit (lib.meta) getExe;
|
||||||
inherit (lib.nvim.types) mkGrammarOption deprecatedSingleOrListOf;
|
inherit (lib.nvim.types) mkGrammarOption deprecatedSingleOrListOf;
|
||||||
inherit (lib.generators) mkLuaInline;
|
inherit (lib.generators) mkLuaInline;
|
||||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||||
|
|
||||||
|
cfg = config.vim.languages.odin;
|
||||||
|
|
||||||
defaultServers = ["ols"];
|
defaultServers = ["ols"];
|
||||||
servers = {
|
servers = {
|
||||||
ols = {
|
ols = {
|
||||||
|
|
@ -32,7 +35,19 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cfg = config.vim.languages.odin;
|
defaultDebugger = "codelldb";
|
||||||
|
debuggers = {
|
||||||
|
codelldb = {
|
||||||
|
package = pkgs.lldb;
|
||||||
|
dapConfig = ''
|
||||||
|
dap.adapters.codelldb = {
|
||||||
|
type = 'executable',
|
||||||
|
command = '${cfg.dap.package}/bin/lldb-dap',
|
||||||
|
name = 'codelldb'
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
options.vim.languages.odin = {
|
options.vim.languages.odin = {
|
||||||
enable = mkEnableOption "Odin language support";
|
enable = mkEnableOption "Odin language support";
|
||||||
|
|
@ -51,6 +66,22 @@ in {
|
||||||
description = "Odin LSP server to use";
|
description = "Odin LSP server to use";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dap = {
|
||||||
|
enable = mkEnableOption "Enable Odin Debug Adapter" // {default = config.vim.languages.enableDAP;};
|
||||||
|
|
||||||
|
debugger = mkOption {
|
||||||
|
description = "Odin debugger to use";
|
||||||
|
type = enum (attrNames debuggers);
|
||||||
|
default = defaultDebugger;
|
||||||
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
description = "Odin debugger package.";
|
||||||
|
type = package;
|
||||||
|
default = debuggers.${cfg.dap.debugger}.package;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
|
@ -67,5 +98,16 @@ in {
|
||||||
})
|
})
|
||||||
cfg.lsp.servers;
|
cfg.lsp.servers;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(mkIf cfg.dap.enable {
|
||||||
|
vim = {
|
||||||
|
startPlugins = ["nvim-dap-odin"];
|
||||||
|
debugger.nvim-dap.sources.odin-debugger = debuggers.${cfg.dap.debugger}.dapConfig;
|
||||||
|
pluginRC.nvim-dap-odin = entryAfter ["nvim-dap"] ''
|
||||||
|
require('nvim-dap-odin').setup()
|
||||||
|
'';
|
||||||
|
debugger.nvim-dap.enable = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1860,6 +1860,19 @@
|
||||||
"url": "https://github.com/leoluz/nvim-dap-go/archive/b4421153ead5d726603b02743ea40cf26a51ed5f.tar.gz",
|
"url": "https://github.com/leoluz/nvim-dap-go/archive/b4421153ead5d726603b02743ea40cf26a51ed5f.tar.gz",
|
||||||
"hash": "sha256-wg9kiW2eAMmg4bvgqaAS9kt7qaVsIWl36BNqRbhZIgo="
|
"hash": "sha256-wg9kiW2eAMmg4bvgqaAS9kt7qaVsIWl36BNqRbhZIgo="
|
||||||
},
|
},
|
||||||
|
"nvim-dap-odin": {
|
||||||
|
"type": "Git",
|
||||||
|
"repository": {
|
||||||
|
"type": "GitHub",
|
||||||
|
"owner": "NANDquark",
|
||||||
|
"repo": "nvim-dap-odin"
|
||||||
|
},
|
||||||
|
"branch": "main",
|
||||||
|
"submodules": false,
|
||||||
|
"revision": "4df40d467f4ea5195e2f3b813d970eb15172b052",
|
||||||
|
"url": "https://github.com/NANDquark/nvim-dap-odin/archive/4df40d467f4ea5195e2f3b813d970eb15172b052.tar.gz",
|
||||||
|
"hash": "sha256-/bW22gWrPamK4jDMJYDv/3od+vIUb/eYICnHWnv8MVU="
|
||||||
|
},
|
||||||
"nvim-dap-ui": {
|
"nvim-dap-ui": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue