From 4b2465abc9805a7f06662a7d1493c3c702392636 Mon Sep 17 00:00:00 2001 From: gnikit Date: Thu, 20 Jun 2024 00:21:03 +0100 Subject: [PATCH 1/2] fix(lsp): use correct symbol for submodules Fixes #413 --- CHANGELOG.md | 5 +++++ fortls/langserver.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa57f4b0..08affcfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Unreleased +### Fixed + +- Fixed incorrect document symbol for `SUBMODULE` statements + ([#413](https://github.com/fortran-lang/fortls/issues/413)) + ## 3.1.1 ### Fixed diff --git a/fortls/langserver.py b/fortls/langserver.py index 8ecbce1c..b6a1982e 100644 --- a/fortls/langserver.py +++ b/fortls/langserver.py @@ -279,7 +279,7 @@ def map_types(type): def serve_document_symbols(self, request: dict): def map_types(type, in_class: bool = False): - if type == 1: + if type in (1, 8): return 2 elif type in (2, 3): if in_class: From 4980ef4b6f0bb112802471106b6171ae7e02faf9 Mon Sep 17 00:00:00 2001 From: gnikit Date: Thu, 20 Jun 2024 00:24:50 +0100 Subject: [PATCH 2/2] docs: bump version in changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08affcfc..50f0fed4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## 3.1.2 + ### Fixed - Fixed incorrect document symbol for `SUBMODULE` statements