Compare commits

...

5 commits

Author SHA1 Message Date
raf
0eeb3f2b6c
Merge pull request #1284 from horriblename/fix-astro-svelte-self
Some checks failed
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
language/{astro,svelte}: fix missing self arg
2025-12-13 17:29:48 +03:00
raf
18749d6be7
Merge branch 'main' into fix-astro-svelte-self 2025-12-13 17:25:03 +03:00
Ching Pei Yang
2fe8be4b6c
languages/rust: fix rustaceanvim DAP adapter (#1283)
Align codelldb adapter setup with rustaceanvim’s built-in logic.
Add languages.rust.dap.backend option to choose between codelldb
and lldb-dap adapters.
2025-12-13 14:17:31 +01:00
Ching Pei Yang
056328ff4a
language/{astro,svelte}: fix missing self arg 2025-12-13 14:05:35 +01:00
Ring-A-Ding-Ding-Baby
1d362cd88e languages/rust: fix rustaceanvim DAP adapter
Align codelldb adapter setup with rustaceanvim’s built-in logic.
Add languages.rust.dap.backend option to choose between codelldb
and lldb-dap adapters.
2025-12-13 16:21:22 +04:00
4 changed files with 37 additions and 9 deletions

View file

@ -621,3 +621,9 @@
[JudahZF](https://github.com/JudahZF): [JudahZF](https://github.com/JudahZF):
- Added gitFiles mapping option to telescope - Added gitFiles mapping option to telescope
[Ring-A-Ding-Ding-Baby](https://github.com/Ring-A-Ding-Ding-Baby)
- Aligned `codelldb` adapter setup with [rustaceanvim]s built-in logic.
- Added `languages.rust.dap.backend` option to choose between `codelldb` and
`lldb-dap` adapters.

View file

@ -1,5 +1,5 @@
{ {
self, inputs,
config, config,
pkgs, pkgs,
lib, lib,
@ -43,7 +43,7 @@
defaultFormat = ["prettier"]; defaultFormat = ["prettier"];
formats = let formats = let
parser = "${self.packages.${pkgs.stdenv.hostPlatform.system}.prettier-plugin-astro}/index.js"; parser = "${inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.prettier-plugin-astro}/index.js";
in { in {
prettier = { prettier = {
command = getExe pkgs.prettier; command = getExe pkgs.prettier;

View file

@ -87,6 +87,19 @@ in {
type = package; type = package;
default = pkgs.lldb; default = pkgs.lldb;
}; };
adapter = mkOption {
type = enum ["lldb-dap" "codelldb"];
default = "codelldb";
description = ''
Select which LLDB-based debug adapter to use:
- "codelldb": use the CodeLLDB adapter from the vadimcn.vscode-lldb extension.
- "lldb-dap": use the LLDB DAP implementation shipped with LLVM (lldb-dap).
The default "codelldb" backend generally provides a better debugging experience for Rust.
'';
};
}; };
extensions = { extensions = {
@ -191,11 +204,20 @@ in {
${optionalString cfg.dap.enable '' ${optionalString cfg.dap.enable ''
dap = { dap = {
adapter = { adapter = ${
type = "executable", if cfg.dap.adapter == "lldb-dap"
command = "${cfg.dap.package}/bin/lldb-dap", then ''
name = "rustacean_lldb", {
}, type = "executable",
command = "${cfg.dap.package}/bin/lldb-dap",
name = "rustacean_lldb",
}''
else let
codelldb = pkgs.vscode-extensions.vadimcn.vscode-lldb.adapter;
codelldbPath = "${codelldb}/bin/codelldb";
liblldbPath = "${codelldb}/share/lldb/lib/liblldb.so";
in ''require("rustaceanvim.config").get_codelldb_adapter("${codelldbPath}", "${liblldbPath}")''
},
}, },
''} ''}
} }

View file

@ -1,5 +1,5 @@
{ {
self, inputs,
config, config,
pkgs, pkgs,
lib, lib,
@ -56,7 +56,7 @@
defaultFormat = ["prettier"]; defaultFormat = ["prettier"];
formats = let formats = let
prettierPlugin = self.packages.${pkgs.stdenv.system}.prettier-plugin-svelte; prettierPlugin = inputs.self.packages.${pkgs.stdenv.system}.prettier-plugin-svelte;
prettierPluginPath = "${prettierPlugin}/lib/node_modules/prettier-plugin-svelte/plugin.js"; prettierPluginPath = "${prettierPlugin}/lib/node_modules/prettier-plugin-svelte/plugin.js";
in { in {
prettier = { prettier = {