Skip to content

Commit

Permalink
fix(html): make sure html ftplugin does not get triggered with other …
Browse files Browse the repository at this point in the history
…filetypes
  • Loading branch information
kkoomen committed Oct 3, 2023
1 parent cc1c785 commit af4c73e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ftplugin/html.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
let s:save_cpo = &cpoptions
set cpoptions&vim

" The HTML filetype also gets triggerred for PHP files (and perhaps others).
if &filetype !=? 'html'
finish
endif

let b:doge_parser = 'html'
let b:doge_insert = 'above'

Expand Down
3 changes: 1 addition & 2 deletions helper/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ pub fn load_doc_config_str<'a>(parser_name: &'a str, doc_name: &'a str) -> &'a s
"c_kernel_doc" => include_str!("c/docs/kernel_doc.yaml"),

"php_phpdoc" => include_str!("php/docs/phpdoc.yaml"),
"typescript_jsdoc" => include_str!("typescript/docs/jsdoc.yaml"),
"html_jsdoc" => include_str!("typescript/docs/jsdoc.yaml"),
"typescript_jsdoc" | "html_jsdoc" => include_str!("typescript/docs/jsdoc.yaml"),
"lua_ldoc" => include_str!("lua/docs/ldoc.yaml"),
"java_javadoc" => include_str!("java/docs/javadoc.yaml"),
"ruby_YARD" => include_str!("ruby/docs/YARD.yaml"),
Expand Down
2 changes: 1 addition & 1 deletion plugin/doge.vim
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ let g:doge_filetype_aliases = doge#utils#deepextend({
\ 'typescript',
\ 'typescript.tsx',
\ ],
\ 'java': ['groovy'],
\ 'html': ['svelte', 'vue'],
\ 'java': ['groovy'],
\}, get(g:, 'doge_filetype_aliases', {}), 1)

if !exists('g:doge_buffer_mappings')
Expand Down

0 comments on commit af4c73e

Please sign in to comment.