This commit is contained in:
Tao Tien 2024-04-12 14:46:13 -07:00
parent 4cc46352be
commit ba253d5c64
2 changed files with 68 additions and 15 deletions

View file

@ -1,29 +1,30 @@
{ {pkgs, ...}: {
inputs,
pkgs,
...
}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
arduino-language-server
arduino-cli
tio
radicle-cli
lua-language-server
# freecad
# vulkan-loader
# gh
# etcher # etcher
# freecad
# gh
# vulkan-loader
hyperfine hyperfine
jq jq
jujutsu
just just
lldb lldb
lua-language-server
radicle-cli
sd sd
sqlite sqlite
sqlx-cli sqlx-cli
sshfs sshfs
tokei
jujutsu
taplo taplo
tio
tokei
# arduino
arduino-language-server
arduino-cli
pkgsCross.avr.buildPackages.gcc
avrdude
ravedude
# c # c
clang clang
@ -57,6 +58,9 @@
#rust #rust
bacon bacon
cargo-feature
cargo-generate
bacon
elf2uf2-rs elf2uf2-rs
mdbook mdbook
mold-wrapped mold-wrapped

View file

@ -43,6 +43,21 @@
}; };
languages = { languages = {
language = [ language = [
{
name = "arduino";
scope = "source.arduino";
injection-regex = "arduino";
file-types = ["ino" "cpp" "h"];
comment-token = "//";
roots = ["*.ino" "sketch.yaml"];
language-servers = ["arduino-language-server"];
indent = {
tab-width = 8;
unit = "\t";
};
auto-format = true;
formatter = {command = "clang-format";};
}
{ {
name = "c"; name = "c";
auto-format = true; auto-format = true;
@ -62,6 +77,30 @@
command = "clang-format"; command = "clang-format";
args = ["--style=file:/home/tao/Templates/clang-format"]; args = ["--style=file:/home/tao/Templates/clang-format"];
}; };
file-types = [
"cc"
"hh"
"c++"
"cpp"
"hpp"
"h"
"ipp"
"tpp"
"cxx"
"hxx"
"ixx"
"txx"
"C"
"H"
"cu"
"cuh"
"cppm"
"h++"
"ii"
"inl"
{glob = ".hpp.in";}
{glob = ".h.in";}
];
indent = { indent = {
tab-width = 8; tab-width = 8;
unit = "\t"; unit = "\t";
@ -124,8 +163,18 @@
command = "jdtls"; command = "jdtls";
args = ["-data" "/home/tao/.cache/jdtls/workspace"]; args = ["-data" "/home/tao/.cache/jdtls/workspace"];
}; };
arduino-language-server = {
command = "arduino-language-server";
};
}; };
grammar = [ grammar = [
{
name = "arduino";
source = {
git = "https://github.com/ObserverOfTime/tree-sitter-arduino";
rev = "db929fc6822b9b9e1211678d508f187894ce0345";
};
}
]; ];
}; };
enable = true; enable = true;