diff --git a/plugin.py b/plugin.py index af63d50..bc87d0a 100644 --- a/plugin.py +++ b/plugin.py @@ -71,7 +71,12 @@ def name(self) -> str: @property def config(self) -> ClientConfig: - settings = sublime.load_settings("LSP-vue.sublime-settings") + settings = sublime.load_settings("LSP-vue.sublime-settings") + config = settings.get('config') + view = sublime.active_window().active_view() + if view is not None: + config['vetur']['format']['options']['tabs_size'] = view.settings().get("tab_size", 4) + config['vetur']['format']['options']['useTabs'] = not view.settings().get("translate_tabs_to_spaces", False) return ClientConfig( name='lsp-vue', binary_args=[ @@ -81,7 +86,7 @@ def config(self) -> ClientConfig: tcp_port=None, enabled=True, init_options={ - "config": settings.get('config') + "config": config }, settings=dict(), env=dict(),