Fix templ file formatting
This commit is contained in:
parent
1f1673571b
commit
36a671f221
|
@ -9,7 +9,7 @@ local M = {
|
|||
function M.config()
|
||||
-- you can create a custom highlight group for the ghost text with the below command.
|
||||
-- change the `highlight` option to `parenhint` if you use this method.
|
||||
vim.api.nvim_exec([[ highlight parenhint guifg='#495659' ]], false)
|
||||
vim.api.nvim_exec([[ highlight parenhint guifg='#56633E' ]], false)
|
||||
require('paren-hint').setup({
|
||||
-- Include the opening paren in the ghost text
|
||||
include_paren = true,
|
||||
|
|
|
@ -65,6 +65,13 @@ return {
|
|||
return
|
||||
end
|
||||
|
||||
-- Go Templ formatting
|
||||
-- If filetype is templ, then we need to use the templ LSP client to format
|
||||
-- So we disable the html client formatting capabilities
|
||||
if vim.bo.filetype == 'templ' and client.name == 'html' then
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
end
|
||||
|
||||
-- Create an autocmd that will run *before* we save the buffer.
|
||||
-- Run the formatting command for the LSP that has just attached.
|
||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
|
|
Loading…
Reference in New Issue