Skip to content

Commit

Permalink
Add fortran lsp support plus some improvements to the syntax highligh…
Browse files Browse the repository at this point in the history
…ter.
  • Loading branch information
SpartanJ committed Nov 30, 2024
1 parent b9037e3 commit 2cdd14c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 19 deletions.
8 changes: 8 additions & 0 deletions bin/assets/plugins/lspclient.json
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,14 @@
"url": "https://github.com/julia-vscode/LanguageServer.jl",
"command": "julia --project=\"$HOME/.julia/packages/LanguageServer/Fwm1f/src/LanguageServer.jl\" -e \"using LanguageServer; runserver()\"",
"file_patterns": ["%.jl"]
},
{
"language": "fortran",
"name": "fortls",
"url": "https://github.com/fortran-lang/fortls",
"command": "fortls --hover_signature --hover_language fortran --use_signature_help --incremental_sync",
"file_patterns": ["%.f$", "%.f90$", "%.f95$"],
"rootIndicationFileNames": [".fortls"]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,39 @@ void addFortran() {
{ { "%w+%f[%s]" }, "normal" },

},
{
{ "then", "keyword" }, { "public", "keyword" }, { "allocatable", "keyword" },
{ "private", "keyword" }, { "concurrent", "keyword" }, { "only", "keyword" },
{ "none", "keyword2" }, { ".or.", "keyword2" }, { "cycle", "keyword" },
{ "len", "keyword2" }, { ".le.", "keyword2" }, { ".not.", "keyword2" },
{ "sequence", "keyword" }, { ".false.", "keyword2" }, { ".eq.", "keyword2" },
{ ".lt.", "keyword2" }, { "end", "keyword" }, { "subroutine", "keyword" },
{ "extends", "keyword" }, { ".neqv.", "keyword2" }, { "complex", "keyword" },
{ "module", "keyword" }, { "result", "keyword" }, { "call", "keyword" },
{ ".true.", "keyword2" }, { "function", "keyword" }, { "logical", "keyword" },
{ "else", "keyword" }, { ".ge", "keyword2" }, { "parameter", "keyword" },
{ "contains", "keyword" }, { "print", "keyword" }, { "write", "keyword" },
{ ".eqv.", "keyword2" }, { ".and.", "keyword2" }, { "struct", "keyword" },
{ "character", "keyword" }, { "integer", "keyword" }, { ".ne.", "keyword2" },
{ "real", "keyword" }, { "use", "keyword" }, { "if", "keyword" },
{ "protected", "keyword" }, { "do", "keyword" }, { ".gt.", "keyword2" },
{ "program", "keyword" }, { "implicit", "keyword" }, { "stop", "keyword" },
{ "type", "keyword" },
{ { "then", "keyword" }, { "public", "keyword" },
{ "allocatable", "keyword" }, { "private", "keyword" },
{ "concurrent", "keyword" }, { "only", "keyword" },
{ "none", "keyword2" }, { ".or.", "keyword2" },
{ "cycle", "keyword" }, { "len", "keyword2" },
{ ".le.", "keyword2" }, { ".not.", "keyword2" },
{ "sequence", "keyword" }, { ".false.", "keyword2" },
{ ".eq.", "keyword2" }, { ".lt.", "keyword2" },
{ "end", "keyword" }, { "subroutine", "keyword" },
{ "extends", "keyword" }, { ".neqv.", "keyword2" },
{ "complex", "keyword" }, { "module", "keyword" },
{ "result", "keyword" }, { "call", "keyword" },
{ ".true.", "keyword2" }, { "function", "keyword" },
{ "logical", "keyword" }, { "else", "keyword" },
{ ".ge", "keyword2" }, { "parameter", "keyword" },
{ "contains", "keyword" }, { "print", "keyword" },
{ "write", "keyword" }, { ".eqv.", "keyword2" },
{ ".and.", "keyword2" }, { "struct", "keyword" },
{ "character", "keyword" }, { "integer", "keyword" },
{ ".ne.", "keyword2" }, { "real", "keyword" },
{ "use", "keyword" }, { "if", "keyword" },
{ "protected", "keyword" }, { "do", "keyword" },
{ ".gt.", "keyword2" }, { "program", "keyword" },
{ "implicit", "keyword" }, { "stop", "keyword" },
{ "type", "keyword" }, { "endif", "keyword" },
{ "enddo", "keyword" }

},
"!",
{}

} );

sd.setCaseInsensitive( true );
sd.setFoldRangeType( FoldRangeType::Indentation );
}

Expand Down

0 comments on commit 2cdd14c

Please sign in to comment.