How do I disable auto formatting on save with Verible? #7013
Unanswered
RisingEdgeIndustries
asked this question in
Q&A
Replies: 1 comment 2 replies
-
vim.api.nvim_create_autocmd("FileType", {
pattern = { "verilog" },
group = vim.api.nvim_create_augroup("verilog_disable_format", {}),
callback = function()
vim.b.autoformat = false
end,
})For |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm using the lazy.nvim config and repo from here:
https://www.lazyvim.org/configuration/lazy.nvim
For reference, I'm using verible in neovim from here:
https://github.com/chipsalliance/verible
I used a fresh install of neovim 0.11.6 and after installing neovim I only installed lazyvim from that link following the instructions which seemed to work find.
My question is, how do I disable formatting (the text) on save for a verilog file (I'm using verible and sv-lang-server). I have seen a lot of examples on how to do this using a lua patter in the autocmd.lua file as shown below:

Hopefully that picture is clear enough...the code is also pasted below:
I have 2x issues:
I did find that verible doesn't seem to support lua patterns:

This seems to match the behavior I'm seeing as I'm unable to turn off the format on save feature for any verilog files.
Does anyone have any idea how I could go about disabling format on save just for specific file types like ".v" and ".sv"? I would assume there is a way to identify the file besides the lua pattern?
Beta Was this translation helpful? Give feedback.
All reactions