You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have set log_level = vim.log.levels.DEBUG and pasted the log contents below.
Log file
Log file: /home/nbe/projects/playground/repro-conform-embed/.repro//state/nvim/conform.log
13:49:53[INFO] Run prettier on /home/nbe/projects/playground/repro-conform-embed/foo.ts
13:49:53[DEBUG] Run command: { "prettier", "--stdin-filepath", "/home/nbe/projects/playground/repro-conform-embed/foo.ts" }
13:49:53[DEBUG] prettier exited with code 0
13:49:53[INFO] Run injected on /home/nbe/projects/playground/repro-conform-embed/foo.ts
Formatters for this buffer:
prettier ready (html, typescript)
injected ready (typescript)
Other formatters:
Describe the bug
Is it a fair assumption to expect the formatter to work whenever treesitter syntax highlighting is working? If so, then this is a bug.
I made a change for #205 that partially fixes this. The one remaining pieces is that the injected formatter currently expects the injected language to occupy entire lines. It can't handle an inline injection like you have on the first line of your example file. I'll add support for that when I get time.
Neovim version (nvim -v)
NVIM v0.9.4 Build type: Release LuaJIT 2.1.1693350652
Operating system/version
"x86_64-linux"
- host os:Linux 6.1.62, NixOS, 23.11 (Tapir), 23.11.20231112.e44462d
- multi-user?:yes
- sandbox:yes
- version: `nix-env (Nix) 2.18.1Add the debug logs
log_level = vim.log.levels.DEBUG
and pasted the log contents below.Log file
Describe the bug
Is it a fair assumption to expect the formatter to work whenever treesitter syntax highlighting is working? If so, then this is a bug.
Steps To Reproduce
Create a
foo.ts
file with the following contents:Observe that treesitter has detected the embedded HTML text. Observe that the embedded HTML text has proper HTML syntax highlighting.
Run
:lua require "conform".format()
.
Expected Behavior
.
Minimal example file
No response
Minimal init.lua
Additional context
No response
The text was updated successfully, but these errors were encountered: