Compare commits
No commits in common. "bdd1e1dd1ca653f7fbeb531c2163b3e682274f15" and "ee6095ecee675787a8e3153a2195813066ca44b8" have entirely different histories.
bdd1e1dd1c
...
ee6095ecee
2 changed files with 2 additions and 23 deletions
|
|
@ -104,8 +104,7 @@ pub const julia = .{
|
|||
pub const kdl = .{};
|
||||
|
||||
pub const lua = .{
|
||||
.language_server = .{"lua-language-server"},
|
||||
.formatter = .{ "stylua", "--indent-type", "{{indent_mode}}", "--indent-width", "{{indent_size}}", "-" },
|
||||
.language_server = .{"lua-lsp"},
|
||||
};
|
||||
|
||||
pub const mail = .{};
|
||||
|
|
|
|||
|
|
@ -6,9 +6,7 @@
|
|||
/// {{selection}} - The current selection of the primary cursor
|
||||
/// {{selections}} - All current selections seperated by NL characters
|
||||
/// {{selectionsZ}} - All current selections separated by NULL characters
|
||||
/// {{selections*}} - All current selections expanded to multiple quoted arguments
|
||||
/// {{indent_mode}} - The current indent mode ("tabs" or "spaces")
|
||||
/// {{indent_size}} - The current indent size (in columns)
|
||||
/// {{selections*}} All current selections expanded to multiple quoted arguments
|
||||
pub fn expand(allocator: Allocator, arg: []const u8) Error![]const u8 {
|
||||
var result: std.Io.Writer.Allocating = .init(allocator);
|
||||
defer result.deinit();
|
||||
|
|
@ -142,24 +140,6 @@ const functions = struct {
|
|||
// };
|
||||
// return results.toOwnedSlice(allocator);
|
||||
// }
|
||||
|
||||
/// {{indent_mode}} - The current indent mode ("tabs" or "spaces")
|
||||
pub fn indent_mode(allocator: Allocator) Error![]const u8 {
|
||||
const mv = tui.mainview() orelse return &.{};
|
||||
const ed = mv.get_active_editor() orelse return &.{};
|
||||
var stream: std.Io.Writer.Allocating = .init(allocator);
|
||||
try stream.writer.print("{t}", .{ed.indent_mode});
|
||||
return stream.toOwnedSlice();
|
||||
}
|
||||
|
||||
/// {{indent_size}} - The current indent size (in columns)
|
||||
pub fn indent_size(allocator: Allocator) Error![]const u8 {
|
||||
const mv = tui.mainview() orelse return &.{};
|
||||
const ed = mv.get_active_editor() orelse return &.{};
|
||||
var stream: std.Io.Writer.Allocating = .init(allocator);
|
||||
try stream.writer.print("{d}", .{ed.indent_size});
|
||||
return stream.toOwnedSlice();
|
||||
}
|
||||
};
|
||||
|
||||
fn get_functions() []struct { []const u8, Function } {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue