Skip to content

Commit

Permalink
Merge pull request #608 from kkoomen/feature/implement-scala
Browse files Browse the repository at this point in the history
Add support for scala
  • Loading branch information
kkoomen authored Aug 13, 2023
2 parents 8b0c8d3 + 3a5f19a commit 2d956b9
Show file tree
Hide file tree
Showing 20 changed files with 440 additions and 353 deletions.
2 changes: 1 addition & 1 deletion addon-info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "doge",
"name": "vim-doge",
"description": "(Do)cumentation (Ge)nerator",
"author": "Kim Koomen"
}
72 changes: 0 additions & 72 deletions ftplugin/_coffee.vim

This file was deleted.

133 changes: 0 additions & 133 deletions ftplugin/_kotlin.vim

This file was deleted.

108 changes: 0 additions & 108 deletions ftplugin/_scala.vim

This file was deleted.

16 changes: 16 additions & 0 deletions ftplugin/scala.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
" ==============================================================================
" The Scala documentation should follow the 'ScalaDoc' conventions.
" see https://docs.scala-lang.org/style/scaladoc.html
" ==============================================================================

let s:save_cpo = &cpoptions
set cpoptions&vim

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

let b:doge_supported_doc_standards = ['scaladoc']
let b:doge_doc_standard = doge#buffer#get_doc_standard('scala')

let &cpoptions = s:save_cpo
unlet s:save_cpo
3 changes: 3 additions & 0 deletions helper/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yaml]
indent_size = 2

[*.md]
trim_trailing_whitespace = false
12 changes: 11 additions & 1 deletion helper/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions helper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ tree-sitter-cpp = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev
tree-sitter-typescript = { git = "https://github.com/tree-sitter/tree-sitter-typescript", rev = "3429d8c" }
tree-sitter-php = { git = "https://github.com/tree-sitter/tree-sitter-php", rev = "d43130f" }
tree-sitter-r = { git = "https://github.com/r-lib/tree-sitter-r", rev = "c55f8b4" }
tree-sitter-scala = { git = "https://github.com/tree-sitter/tree-sitter-scala", rev = "f14629b" }
1 change: 1 addition & 0 deletions helper/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub fn load_doc_config_str<'a>(parser_name: &'a str, doc_name: &'a str) -> &'a s
"bash_google" => include_str!("bash/docs/google.yaml"),
"rust_rustdoc" => include_str!("rust/docs/rustdoc.yaml"),
"r_roxygen2" => include_str!("r/docs/roxygen2.yaml"),
"scala_scaladoc" => include_str!("scala/docs/scaladoc.yaml"),

_ => panic!("Unsupported {} doc: {}", parser_name, doc_name),
}
Expand Down
Loading

0 comments on commit 2d956b9

Please sign in to comment.