mirror of https://github.com/dense-analysis/ale
Add support for Fortran language server by @hansec
This commit is contained in:
parent
27f1915745
commit
324838adae
|
@ -119,7 +119,7 @@ formatting.
|
||||||
| Erb | [erb](https://apidock.com/ruby/ERB), [erubi](https://github.com/jeremyevans/erubi), [erubis](https://github.com/kwatch/erubis) |
|
| Erb | [erb](https://apidock.com/ruby/ERB), [erubi](https://github.com/jeremyevans/erubi), [erubis](https://github.com/kwatch/erubis) |
|
||||||
| Erlang | [erlc](http://erlang.org/doc/man/erlc.html), [SyntaxErl](https://github.com/ten0s/syntaxerl) |
|
| Erlang | [erlc](http://erlang.org/doc/man/erlc.html), [SyntaxErl](https://github.com/ten0s/syntaxerl) |
|
||||||
| Fish | fish [-n flag](https://linux.die.net/man/1/fish)
|
| Fish | fish [-n flag](https://linux.die.net/man/1/fish)
|
||||||
| Fortran | [gcc](https://gcc.gnu.org/) |
|
| Fortran | [gcc](https://gcc.gnu.org/), [language_server](https://github.com/hansec/fortran-language-server) |
|
||||||
| Fountain | [proselint](http://proselint.com/) |
|
| Fountain | [proselint](http://proselint.com/) |
|
||||||
| FusionScript | [fusion-lint](https://github.com/RyanSquared/fusionscript) |
|
| FusionScript | [fusion-lint](https://github.com/RyanSquared/fusionscript) |
|
||||||
| Git Commit Messages | [gitlint](https://github.com/jorisroovers/gitlint) |
|
| Git Commit Messages | [gitlint](https://github.com/jorisroovers/gitlint) |
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
" Author: unpairedbracket ben.spiers22@gmail.com
|
||||||
|
" Description: A language server for fortran
|
||||||
|
|
||||||
|
call ale#Set('fortran_language_server_executable', 'fortls')
|
||||||
|
call ale#Set('fortran_language_server_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||||
|
|
||||||
|
function! ale_linters#fortran#language_server#GetExecutable(buffer) abort
|
||||||
|
return ale#Var(a:buffer, 'fortran_language_server_executable')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! ale_linters#fortran#language_server#GetProjectRoot(buffer) abort
|
||||||
|
let l:fortls_file = ale#path#FindNearestFile(a:buffer, '.fortls')
|
||||||
|
|
||||||
|
return !empty(l:fortls_file) ? fnamemodify(l:fortls_file, ':h') : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
call ale#linter#Define('fortran', {
|
||||||
|
\ 'name': 'language_server',
|
||||||
|
\ 'lsp': 'stdio',
|
||||||
|
\ 'executable_callback': 'ale_linters#fortran#language_server#GetExecutable',
|
||||||
|
\ 'command_callback': 'ale_linters#fortran#language_server#GetExecutable',
|
||||||
|
\ 'project_root_callback': 'ale_linters#fortran#language_server#GetProjectRoot',
|
||||||
|
\})
|
|
@ -355,7 +355,7 @@ Notes:
|
||||||
* Erb: `erb`, `erubi`, `erubis`
|
* Erb: `erb`, `erubi`, `erubis`
|
||||||
* Erlang: `erlc`, `SyntaxErl`
|
* Erlang: `erlc`, `SyntaxErl`
|
||||||
* Fish: `fish` (-n flag)
|
* Fish: `fish` (-n flag)
|
||||||
* Fortran: `gcc`
|
* Fortran: `gcc`, `language_server`
|
||||||
* Fountain: `proselint`
|
* Fountain: `proselint`
|
||||||
* FusionScript: `fusion-lint`
|
* FusionScript: `fusion-lint`
|
||||||
* Git Commit Messages: `gitlint`
|
* Git Commit Messages: `gitlint`
|
||||||
|
|
Loading…
Reference in New Issue