Compare commits

...

6 Commits

Author SHA1 Message Date
Ching Pei Yang d613ed6231
Merge 6c81de4ed6 into b0af809b95 2024-06-26 18:14:46 +00:00
raf b0af809b95
Merge pull request #320 from diniamo/catppuccin-set-term-colors
themes/catppuccin: set term colors
2024-06-26 17:55:36 +00:00
diniamo bb2a78272b themes/catppuccin: set term colors 2024-06-25 19:19:58 +02:00
Ching Pei Yang 6c81de4ed6 docs: update release notes 2024-06-25 19:17:00 +02:00
Pei Yang Ching 156af70ca2 go: use dap-go plugin for dap configurations 2024-06-25 16:36:33 +02:00
Pei Yang Ching 93fcf6875b deps: add nvim-dap-go 2024-06-25 16:36:13 +02:00
5 changed files with 42 additions and 38 deletions

View File

@ -29,6 +29,7 @@ Release notes for release 0.7
- Fix broken treesitter-context keybinds in visual mode
- Deprecate use of `__empty` to define empty tables in lua. Empty attrset are no
longer filtered and thus should be used instead.
- Add dap-go for better dap configurations
[jacekpoz](https://github.com/jacekpoz):
@ -40,7 +41,9 @@ Release notes for release 0.7
- Move the `theme` dag entry to before `luaScript`.
- Add rustfmt as the default formatter for Rust
- Add rustfmt as the default formatter for Rust.
- Enabled the terminal integration of catppuccin for theming Neovim's built-in terminal (this also affects toggleterm).
[NotAShelf](https://github.com/notashelf):

View File

@ -1069,6 +1069,22 @@
"type": "github"
}
},
"plugin-nvim-dap-go": {
"flake": false,
"locked": {
"lastModified": 1716775637,
"narHash": "sha256-B8A+ven18YgePLxAN3Q/j5NFb0FeTHCQak1uzaNDX9c=",
"owner": "leoluz",
"repo": "nvim-dap-go",
"rev": "a0c5a2b991d7e9304a9a032cf177e22a4b0acda1",
"type": "github"
},
"original": {
"owner": "leoluz",
"repo": "nvim-dap-go",
"type": "github"
}
},
"plugin-nvim-dap-ui": {
"flake": false,
"locked": {
@ -1823,6 +1839,7 @@
"plugin-nvim-colorizer-lua": "plugin-nvim-colorizer-lua",
"plugin-nvim-cursorline": "plugin-nvim-cursorline",
"plugin-nvim-dap": "plugin-nvim-dap",
"plugin-nvim-dap-go": "plugin-nvim-dap-go",
"plugin-nvim-dap-ui": "plugin-nvim-dap-ui",
"plugin-nvim-docs-view": "plugin-nvim-docs-view",
"plugin-nvim-lightbulb": "plugin-nvim-lightbulb",

View File

@ -216,6 +216,11 @@
flake = false;
};
plugin-nvim-dap-go = {
url = "github:leoluz/nvim-dap-go";
flake = false;
};
# Filetrees
plugin-nvim-tree-lua = {
url = "github:nvim-tree/nvim-tree.lua";

View File

@ -12,6 +12,7 @@
inherit (lib.types) bool enum either listOf package str;
inherit (lib.nvim.types) mkGrammarOption;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.dag) entryAfter;
cfg = config.vim.languages.go;
@ -37,40 +38,6 @@
debuggers = {
delve = {
package = pkgs.delve;
dapConfig = ''
dap.adapters.delve = {
type = "server",
port = "''${port}",
executable = {
command = "${getExe cfg.dap.package}",
args = { "dap", "-l", "127.0.0.1:''${port}" },
},
}
dap.configurations.go = {
{
type = "delve",
name = "Debug",
request = "launch",
program = "''${file}",
},
{
type = "delve",
name = "Debug test", -- configuration for debugging test files
request = "launch",
mode = "test",
program = "''${file}",
},
-- works with go.mod packages and sub packages
{
type = "delve",
name = "Debug test (go.mod)",
request = "launch",
mode = "test",
program = "./''${relativeFileDirname}",
},
}
'';
};
};
in {
@ -102,15 +69,17 @@ in {
dap = {
enable = mkOption {
description = "Enable Go Debug Adapter";
description = "Enable Go Debug Adapter via nvim-dap-go plugin";
type = bool;
default = config.vim.languages.enableDAP;
};
debugger = mkOption {
description = "Go debugger to use";
type = enum (attrNames debuggers);
default = defaultDebugger;
};
package = mkOption {
description = "Go debugger package.";
type = package;
@ -131,8 +100,17 @@ in {
})
(mkIf cfg.dap.enable {
vim.debugger.nvim-dap.enable = true;
vim.debugger.nvim-dap.sources.go-debugger = debuggers.${cfg.dap.debugger}.dapConfig;
vim = {
startPlugins = ["nvim-dap-go"];
luaConfigRC.nvim-dap-go = entryAfter ["nvim-dap"] ''
require('dap-go').setup {
delve = {
path = '${getExe cfg.dap.package}',
}
}
'';
debugger.nvim-dap.enable = true;
};
})
]);
}

View File

@ -53,6 +53,7 @@ in {
require('catppuccin').setup {
flavour = "${style}",
transparent_background = ${boolToString transparent},
term_colors = true,
integrations = {
nvimtree = {
enabled = true,