File: features.rst

package info (click to toggle)
fortran-language-server 3.2.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,268 kB
  • sloc: python: 9,688; f90: 1,195; fortran: 30; makefile: 28; ansic: 20
file content (146 lines) | stat: -rw-r--r-- 3,627 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
Features
===============

- Project-wide and Document symbol detection and Renaming
- Hover support, Signature help and Auto-completion
- GoTo/Peek implementation and Find/Peek references
- Preprocessor support
- Documentation parsing `Doxygen <http://www.doxygen.org/>`__ and `FORD <https://github.com/Fortran-FOSS-Programmers/ford>`__ styles
- Diagnostics
- Code actions
- Intrinsics modules


Completion
----------

.. image:: ../assets/lsp/completion-ani.gif

.. image:: ../assets/lsp/completion.png


Hover
-------

.. image:: ../assets/lsp/hover.png

.. image:: ../assets/lsp/hover2.png


Symbols
------------

Project-wide and single Document symbol search

.. image:: ../assets/lsp/symbols-workspace.png

.. image:: ../assets/lsp/symbols-doc.png



Signature Help
----------------

.. image:: ../assets/lsp/sig-help.gif


Find References
------------------

.. figure:: ../assets/lsp/definition-goto.gif
    :align: left

    *Go To Definition of a function*


.. figure:: ../assets/lsp/definition-peek.png
    :align: left

    *Peek into the Definition of a function*


.. figure:: ../assets/lsp/references-peek.png
    :align: left

    *Peek into all the References of a function*


Renaming
------------

.. figure:: ../assets/lsp/rename.gif
    :align: left

    *Rename a variable*


Diagnostics
-------------

- Multiple definitions with the same variable name
- Variable definition masks definition from parent scope
- Missing subroutine/function arguments
- Unknown user-defined type used in ``TYPE``/ ``CLASS`` definition (only if visible in project)
- Unclosed blocks/scopes
- Invalid scope nesting
- Unknown modules in ``USE`` statement
- Unimplemented deferred type-bound procedures
- Use of non-imported variables/objects in interface blocks
- Statement placement errors (``CONTAINS``, ``IMPLICIT``, ``IMPORT``)



Code Actions
---------------

- Generate type-bound procedures and implementation templates for deferred procedures


Intrinsics Modules
------------------


- ``ISO_FORTRAN_ENV``, ``ISO_C_BINDING`` GCC 11.2.0
- ``IEEE_EXCEPTIONS``, ``IEEE_ARITHMETIC``, ``IEEE_FEATURES`` GCC 11.2.0
- OpenMP ``OMP_LIB``, ``OMP_LIB_KINDS`` v5.0
- OpenACC ``OPENACC``, ``OPENACC_KINDS`` v3.1


All LSP Requests
--------------------

.. list-table:: tmp
    :header-rows: 1

    *   - Request
        - Description
    *   - ``workspace/symbol``
        - Get workspace-wide symbols
    *   - ``textDocument/documentSymbol``
        - Get document symbols e.g. functions, subroutines, etc.
    *   - ``textDocument/completion``
        - Suggested tab-completion when typing
    *   - ``textDocument/signatureHelp``
        - Get signature information at a given cursor position
    *   - ``textDocument/definition``
        - GoTo definition/Peek definition
    *   - ``textDocument/references``
        - Find all/Peek references
    *   - ``textDocument/documentHighlight``
        - Same as ``textDocument/references``
    *   - ``textDocument/hover``
        - Show messages and signatures upon hover
    *   - ``textDocument/implementation``
        - GoTo implementation/Peek implementation
    *   - ``textDocument/rename``
        - Rename a symbol across the workspace
    *   - ``textDocument/didOpen``
        - Document synchronisation upon opening
    *   - ``textDocument/didSave``
        - Document synchronisation upon saving
    *   - ``textDocument/didClose``
        - Document synchronisation upon closing
    *   - ``textDocument/didChange``
        - Document synchronisation upon changes to the document
    *   - ``textDocument/codeAction``
        - **Experimental** Generate code