diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-08-25 11:57:03 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-10-06 13:16:19 +0200 |
| commit | 15fbc713017dc6db6bdca7b16a2b9a3f4e201867 (patch) | |
| tree | 5175cb2d59330e7881e00ce4fbd0f0feec82d92e /init.lua | |
| parent | f496305a500f8c3846c4898c06ee313bec25a59b (diff) | |
| download | vis-lspc-15fbc713017dc6db6bdca7b16a2b9a3f4e201867.tar.gz vis-lspc-15fbc713017dc6db6bdca7b16a2b9a3f4e201867.zip | |
use vis default formatting options
Since vis 0.9 the options are exposed via the vis.options table.
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1407,8 +1407,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) |
