|
1 |
| -# fortls - the Fortran Language Server |
| 1 | +# fortls - Fortran Language Server |
2 | 2 |
|
3 | 3 | 
|
4 | 4 | 
|
|
11 | 11 | `fortls` is an implementation of the [Language Server Protocol](https://github.com/Microsoft/language-server-protocol)
|
12 | 12 | (LSP) for Fortran using Python (3.7+).
|
13 | 13 |
|
14 |
| -Editor extensions that can integrate with `fortls` to provide autocomplete and |
15 |
| -other IDE-like functionality are available for |
16 |
| -[Visual Studio Code](https://github.com/krvajal/vscode-fortran-support), |
17 |
| -[Atom](https://atom.io/packages/ide-fortran), |
18 |
| -[Visual Studio](https://github.com/michaelkonecny/vs-fortran-ls-client), |
19 |
| -[(Neo)vim](https://github.com/hansec/fortran-language-server/wiki/Using-forts-with-vim), |
20 |
| -and [Emacs](https://github.com/emacs-lsp/lsp-mode). |
| 14 | +All code editors that support LSP can integrate with `fortls` see the section |
| 15 | +[Editor Integration](https://gnikit.github.io/fortls/editor_integration.html#editor-integration) in the documentation. |
| 16 | +Some supported code editors include: |
| 17 | +[Visual Studio Code](https://gnikit.github.io/fortls/editor_integration.html#visual-studio-code), |
| 18 | +[Atom](https://gnikit.github.io/fortls/editor_integration.html#atom), |
| 19 | +[Sublime Text](https://gnikit.github.io/fortls/editor_integration.html#sublime-text) |
| 20 | +[(Neo)Vim](https://gnikit.github.io/fortls/editor_integration.html#vim-neovim-gvim), |
| 21 | +[Visual Studio](https://gnikit.github.io/fortls/editor_integration.html#visual-studio-2017), |
| 22 | +and [Emacs](https://gnikit.github.io/fortls/editor_integration.html#emacs). |
21 | 23 |
|
22 |
| -## fortls vs fortran-language-server |
| 24 | +## `fortls` vs `fortran-language-server` |
23 | 25 |
|
24 | 26 | This project is based on @hansec's original Language Server implementation but the two projects have since diverged.
|
25 | 27 | `fortls` (this project) is now developed independently of the upstream `hansec/fortran-language-server` project and contains numerous bug fixes and new features
|
@@ -56,32 +58,30 @@ potentially subject to change.
|
56 | 58 | - Invalid scope nesting
|
57 | 59 | - Unknown modules in `USE` statement
|
58 | 60 | - Unimplemented deferred type-bound procedures
|
59 |
| - - Use of unimported variables/objects in interface blocks |
| 61 | + - Use of non-imported variables/objects in interface blocks |
60 | 62 | - Statement placement errors (`CONTAINS`, `IMPLICIT`, `IMPORT`)
|
61 |
| -- Code actions (`textDocument/codeAction`) \[Experimental\] |
| 63 | +- Code actions |
62 | 64 | - Generate type-bound procedures and implementation templates for
|
63 | 65 | deferred procedures
|
64 | 66 |
|
65 | 67 | ### Notes/Limitations
|
66 | 68 |
|
67 |
| -- Signature help is not available for overloaded subroutines/functions |
68 |
| -- Diagnostics are only updated when files are saved or opened/closed |
| 69 | +- Signature help and hover does not handle elegantly overloaded functions i.e. interfaces |
69 | 70 |
|
70 | 71 | ## Installation
|
71 | 72 |
|
72 | 73 | ```sh
|
73 | 74 | pip install fortls
|
74 | 75 | ```
|
75 | 76 |
|
76 |
| ->**Warning**: it is not recommended having `fortls` and `fortran-language-server` |
77 |
| ->simultaneously installed, since they use the same binary name. If you are having trouble |
78 |
| ->getting `fortls` to work try uninstalling `fortran-language-server` and reinstalling `fortls`. |
| 77 | +> **Warning**: it is not recommended having `fortls` and `fortran-language-server` |
| 78 | +> simultaneously installed, since they use the same binary name. If you are having trouble |
| 79 | +> getting `fortls` to work try uninstalling `fortran-language-server` and reinstalling `fortls`. |
79 | 80 | >
|
80 |
| ->```sh |
81 |
| ->pip uninstall fortran-language-server |
82 |
| ->pip install fortls --upgrade |
83 |
| ->``` |
84 |
| -
|
| 81 | +> ```sh |
| 82 | +> pip uninstall fortran-language-server |
| 83 | +> pip install fortls --upgrade |
| 84 | +> ``` |
85 | 85 |
|
86 | 86 | ## Settings
|
87 | 87 |
|
@@ -115,9 +115,15 @@ An example for a Configuration file is given below
|
115 | 115 | | `textDocument/documentSymbol` | Get document symbols e.g. functions, subroutines, etc. |
|
116 | 116 | | `textDocument/completion` | Suggested tab-completion when typing |
|
117 | 117 | | `textDocument/signatureHelp` | Get signature information at a given cursor position |
|
118 |
| -| `textDocument/definition` | GoTo implementation/Peek implementation | |
| 118 | +| `textDocument/definition` | GoTo definition/Peek definition | |
119 | 119 | | `textDocument/references` | Find all/Peek references |
|
| 120 | +| `textDocument/hover` | Show messages and signatures upon hover | |
| 121 | +| `textDocument/implementation` | GoTo implementation/Peek implementation | |
120 | 122 | | `textDocument/rename` | Rename a symbol across the workspace |
|
| 123 | +| `textDocument/didOpen` | Document synchronisation upon opening | |
| 124 | +| `textDocument/didSave` | Document synchronisation upon saving | |
| 125 | +| `textDocument/didClose` | Document synchronisation upon closing | |
| 126 | +| `textDocument/didChange` | Document synchronisation upon changes to the document | |
121 | 127 | | `textDocument/codeAction` | **Experimental** Generate code |
|
122 | 128 |
|
123 | 129 | ## Acknowledgements
|
|
0 commit comments