Skip to content

[QUESTION] indent-barss-spacing wrong value on json-ts-mode #127

@chrisemke

Description

@chrisemke

I'm using dtrt-indent to set the "json-ts-mode-indent-offset" like this:

(use-package dtrt-indent
	:custom
	(dtrt-indent-verbosity 0)
	(dtrt-indent-run-after-smie t)
	:config (dtrt-indent-global-mode t)
	:ensure t
	)

and it's setting the right values on my variable, even doom modeline shows corectly.

Image

probably this is because it's setting after the indent-bars read?

This is my current indent-bars config:

(use-package indent-bars
	:custom
	(indent-bars-treesit-support t)
	(indent-bars-treesit-wrap '((python argument_list parameters
																			list list_comprehension
																			dictionary dictionary_comprehension
																			parenthesized_expression subscript)
															(toml table array comment)
															(yaml block_mapping_pair comment)
															(rust arguments parameters)
															(c argument_list parameter_list init_declarator parenthesized_expression)))
	(indent-bars-treesit-scope '((rust trait_item impl_item 
																		 macro_definition macro_invocation 
																		 struct_item enum_item mod_item 
																		 const_item let_declaration 
																		 function_item for_expression 
																		 if_expression loop_expression 
																		 while_expression match_expression 
																		 match_arm call_expression 
																		 token_tree token_tree_pattern 
																		 token_repetition)))
	(indent-bars-treesit-ignore-blank-lines-types '("module"))
	(indent-bars-color '(highlight :face-bg t :blend 0.15))
	(indent-bars-pattern ".")
  (indent-bars-width-frac 0.1)
  (indent-bars-pad-frac 0.1)
  (indent-bars-zigzag nil)
  (indent-bars-color-by-depth '(:regexp "outline-\\([0-9]+\\)" :blend 1)) ; blend=1: blend with BG only
  (indent-bars-highlight-current-depth '(:blend 0.5)) ; pump up the BG blend on current
  (indent-bars-display-on-blank-lines t)
	(indent-bars-starting-column 0)
	:ensure t
	:hook (prog-mode . indent-bars-mode)
	;; (json-ts-mode . (lambda () (setq-local indent-bars-spacing 4))) ;; If I do this it works but I don't want to keep strict like this
	)

here's the config I'm using :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions