mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-09 14:45:58 +01:00
dev: init nvim-dap setup
This commit is contained in:
parent
e4c2c3dfe4
commit
640e37bd08
9 changed files with 100 additions and 0 deletions
|
@ -39,6 +39,13 @@ inputs: let
|
|||
lspSignature.enable = true;
|
||||
};
|
||||
|
||||
vim.debugger = {
|
||||
nvim-dap = {
|
||||
enable = true;
|
||||
ui.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
vim.languages = {
|
||||
enableLSP = true;
|
||||
enableFormat = true;
|
||||
|
@ -217,6 +224,7 @@ inputs: let
|
|||
image_text = "The Superior Text Editor";
|
||||
client_id = "793271441293967371";
|
||||
main_image = "neovim";
|
||||
show_time = true;
|
||||
rich_presence = {
|
||||
editing_text = "Editing %s";
|
||||
};
|
||||
|
|
34
flake.lock
34
flake.lock
|
@ -1012,6 +1012,38 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-dap": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1682077642,
|
||||
"narHash": "sha256-l5sJ6PKW10CtOzSBKzWasWVMZq/mAkgpgWOecIVuV+0=",
|
||||
"owner": "mfussenegger",
|
||||
"repo": "nvim-dap",
|
||||
"rev": "6cedcb527e264c8f25e86afa8dae74c6692dee51",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mfussenegger",
|
||||
"repo": "nvim-dap",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-dap-ui": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1683055722,
|
||||
"narHash": "sha256-8TavZqkTCr2/jaO3C8fp+r7qfN6mCzVvidbHGtJGLfs=",
|
||||
"owner": "rcarriga",
|
||||
"repo": "nvim-dap-ui",
|
||||
"rev": "749bfe12d1447703899fa823c1c075fbe2d42c24",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rcarriga",
|
||||
"repo": "nvim-dap-ui",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-lightbulb": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -1360,6 +1392,8 @@
|
|||
"nvim-colorizer-lua": "nvim-colorizer-lua",
|
||||
"nvim-compe": "nvim-compe",
|
||||
"nvim-cursorline": "nvim-cursorline",
|
||||
"nvim-dap": "nvim-dap",
|
||||
"nvim-dap-ui": "nvim-dap-ui",
|
||||
"nvim-lightbulb": "nvim-lightbulb",
|
||||
"nvim-lspconfig": "nvim-lspconfig",
|
||||
"nvim-neoclip": "nvim-neoclip",
|
||||
|
|
11
flake.nix
11
flake.nix
|
@ -162,6 +162,17 @@
|
|||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
|
||||
# Debuggers
|
||||
nvim-dap = {
|
||||
url = "github:mfussenegger/nvim-dap";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
nvim-dap-ui = {
|
||||
url = "github:rcarriga/nvim-dap-ui";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# Filetrees
|
||||
nvim-tree-lua = {
|
||||
url = "github:nvim-tree/nvim-tree.lua";
|
||||
|
|
|
@ -85,6 +85,8 @@ with lib; let
|
|||
"nvim-colorizer-lua"
|
||||
"vim-illuminate"
|
||||
"nvim-surround"
|
||||
"nvim-dap"
|
||||
"nvim-dap-ui"
|
||||
];
|
||||
# You can either use the name of the plugin or a package.
|
||||
pluginsType = with types;
|
||||
|
|
5
modules/debugger/default.nix
Normal file
5
modules/debugger/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
imports = [
|
||||
./nvim-dap
|
||||
];
|
||||
}
|
23
modules/debugger/nvim-dap/config.nix
Normal file
23
modules/debugger/nvim-dap/config.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.debugger.nvim-dap;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins =
|
||||
[
|
||||
"nvim-dap"
|
||||
]
|
||||
++ optionals cfg.ui.enable [
|
||||
"nvim-dap-ui"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.nvim-dap-ui = nvim.dag.entryAnywhere ''
|
||||
require("dapui").setup()
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/debugger/nvim-dap/default.nix
Normal file
6
modules/debugger/nvim-dap/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./config.nix
|
||||
./nvim-dap.nix
|
||||
];
|
||||
}
|
10
modules/debugger/nvim-dap/nvim-dap.nix
Normal file
10
modules/debugger/nvim-dap/nvim-dap.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{lib, ...}:
|
||||
with lib; {
|
||||
options.vim.debugger.nvim-dap = {
|
||||
enable = mkEnableOption "Enable debugging via nvim-dap";
|
||||
|
||||
ui = {
|
||||
enable = mkEnableOption "Enable UI extension for nvim-dap";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -29,6 +29,7 @@
|
|||
./comments
|
||||
./projects
|
||||
./languages
|
||||
./debugger
|
||||
];
|
||||
|
||||
pkgsModule = {config, ...}: {
|
||||
|
|
Loading…
Reference in a new issue