Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions src/file_type_lsp.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ pub const bash = .{
.formatter = .{ "shfmt", "--indent", "4" },
};

pub const bibtex = .{
.language_server = .{"texlab"},
.formatter = .{
"bibtex-tidy",
"-",
"--curly",
"--drop-all-caps",
"--remove-empty-fields",
"--sort-fields",
"--sort=year,author,id",
"--strip-enclosing-braces",
"--trailing-commas",
},
};

pub const c = .{
.language_server = .{"clangd"},
.formatter = .{"clang-format"},
Expand Down Expand Up @@ -125,10 +140,19 @@ pub const julia = .{
.formatter = .{ "julia", "-e", "using JuliaFormatter; print(format_text(read(stdin, String)))" },
};

pub const just = .{
.language_server = .{"just-lsp"},
};

pub const kdl = .{
.formatter = .{ "kdlfmt", "format", "-" },
};

pub const latex = .{
.language_server = .{"texlab"},
.formatter = .{ "tex-fmt", "--stdin" },
};

pub const lua = .{
.language_server = .{"lua-language-server"},
.formatter = .{ "stylua", "--indent-type", "{{indent_mode}}", "--indent-width", "{{indent_size}}", "-" },
Expand Down Expand Up @@ -159,7 +183,7 @@ pub const ninja = .{};

pub const nix = .{
.language_server = .{"nixd"},
.formatter = .{"alejandra"},
.formatter = .{ "alejandra", "-q" },
};

pub const nu = .{
Expand Down Expand Up @@ -285,6 +309,12 @@ pub const zig = .{
.formatter = .{ "zig", "fmt", "--stdin" },
};

pub const ziggy = .{};
pub const ziggy = .{
.language_server = .{ "ziggy", "lsp" },
.formatter = .{ "ziggy", "fmt", "--stdin" },
};

pub const @"ziggy-schema" = .{};
pub const @"ziggy-schema" = .{
.language_server = .{ "ziggy", "lsp", "--schema" },
.formatter = .{ "ziggy", "fmt", "--stdin-schema" },
};