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-01 14:17:03 +0200 |
| commit | 6ae1cb0e642f91cde534ae9ef3ae918c83eb63e7 (patch) | |
| tree | aaf07a35c73fad340f4a4dc2ef3ea045f4e81a86 /init.lua | |
| parent | 592109ad9df8f36b8c4bb9f48e741123d5bf47d9 (diff) | |
| download | vis-lspc-6ae1cb0e642f91cde534ae9ef3ae918c83eb63e7.tar.gz vis-lspc-6ae1cb0e642f91cde534ae9ef3ae918c83eb63e7.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
@@ -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) |
