mirror of
https://github.com/fred-drake/neovim.git
synced 2026-06-05 14:59:28 -05:00
Added DAP and created dedicated configuration for Rust
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }: {
|
||||
plugins.dap = {
|
||||
enable = true;
|
||||
extensions = {
|
||||
dap-ui.enable = true;
|
||||
dap-virtual-text.enable = true;
|
||||
};
|
||||
|
||||
adapters = {
|
||||
executables = { lldb = { command = "${pkgs.lldb_19}/bin/lldb-dap"; }; };
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
let
|
||||
# Read all files in the current directory
|
||||
files = builtins.readDir ./.;
|
||||
|
||||
# Filter out default.nix and non-.nix files
|
||||
nixFiles = builtins.filter
|
||||
(name: name != "default.nix" && builtins.match ".*\\.nix" name != null)
|
||||
(builtins.attrNames files);
|
||||
|
||||
# Create a list of import statements
|
||||
imports = map (name: ./. + "/${name}") nixFiles;
|
||||
in {
|
||||
# Import all configuration modules automatically
|
||||
imports = imports;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{ pkgs, ... }: {
|
||||
plugins = {
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
settings = { formatters_by_ft.rust = [ "rustfmt" ]; };
|
||||
};
|
||||
rustaceanvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
dap.adapter = {
|
||||
command = "${pkgs.lldb_19}/bin/lldb-dap";
|
||||
type = "executable";
|
||||
};
|
||||
tools.enable_clippy = true;
|
||||
server = {
|
||||
default_settings = {
|
||||
inlayHints = { lifetimeElisionHints = { enable = "always"; }; };
|
||||
rust-analyzer = {
|
||||
cargo = { allFeatures = true; };
|
||||
check = { command = "clippy"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user