From 6ae1cb0e642f91cde534ae9ef3ae918c83eb63e7 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 25 Aug 2023 11:57:03 +0200 Subject: use vis default formatting options Since vis 0.9 the options are exposed via the vis.options table. --- init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index aca8425..a530b48 100644 --- a/init.lua +++ b/init.lua @@ -1381,8 +1381,10 @@ vis:command_register('lspc-format', function(_, _, win) options = ls.formatting_options, } if params.options == nil then - -- probably a safe default, but this should be hooked up to the vis options - params.options = {tabSize = 4, insertSpaces = true} + params.options = { + tabSize = win.options.tabwidth, + insertSpaces = win.options.expandtab, + } end ls_call_text_document_method(ls, 'formatting', params, win) -- cgit v1.2.3