Add support for plain text.

This commit is contained in:
2026-07-13 13:10:02 +02:00
parent 9aaccf3ac9
commit f40d9f81ea
3 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ vim-licenser automatically detects your file type and applies the appropriate
comment style. Supported file types include:
bash, c, cmake, cpp, csharp, css, dart, go, groovy, haskell, html, java,
javascript, json, kotlin, lua, matlab, perl, php, python, r, ruby, rust, scala,
shell, sql, swift, typescript, typescriptreact, vim, xml, yaml
shell, sql, swift, text, typescript, typescriptreact, vim, xml, yaml
For more information, see `:help licenser` after installation.
+1
View File
@@ -83,6 +83,7 @@ vim-licenser supports the following filetypes with appropriate comment styles:
shell - Shell script
sql - SQL
swift - Swift
text - Plain text
typescript - TypeScript
typescriptreact - TypeScript React (TSX)
vim - Vim script
+1
View File
@@ -69,6 +69,7 @@ function! s:GetCommentStyle(filetype) abort
\ 'shell': {'margin': 0, 'hashbang': 1, 'prefix': '', 'middle': '#', 'suffix': ''},
\ 'sql': {'margin': 1, 'hashbang': 0, 'prefix': '/*', 'middle': ' *', 'suffix': ' */'},
\ 'swift': {'margin': 1, 'hashbang': 0, 'prefix': '/*', 'middle': ' *', 'suffix': ' */'},
\ 'text': {'margin': 0, 'hashbang': 0, 'prefix': '', 'middle': '', 'suffix': ''},
\ 'typescript': {'margin': 1, 'hashbang': 0, 'prefix': '/*', 'middle': ' *', 'suffix': ' */'},
\ 'typescriptreact': {'margin': 1, 'hashbang': 0, 'prefix': '/*', 'middle': ' *', 'suffix': ' */'},
\ 'vim': {'margin': 0, 'hashbang': 0, 'prefix': '', 'middle': '"', 'suffix': ''},