Skip to content

Commit 52ff9c1

Browse files
committed
schema ghc98
1 parent 3396006 commit 52ff9c1

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/Outline.hs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{-# LANGUAGE DuplicateRecordFields #-}
44
{-# LANGUAGE GADTs #-}
55
{-# LANGUAGE OverloadedStrings #-}
6-
{-# LANGUAGE RecordWildCards #-}
76
{-# LANGUAGE ViewPatterns #-}
87

98
module Ide.Plugin.Cabal.Outline where
@@ -92,13 +91,13 @@ addNameLengthToLSPRange (LSP.Range pos1 (LSP.Position line char)) name =
9291
(LSP.Position line (char + fromIntegral (T.length name)))
9392

9493
defDocumentSymbol :: LSP.Range -> DocumentSymbol
95-
defDocumentSymbol range = DocumentSymbol {..}
96-
where
97-
_detail = Nothing
98-
_deprecated = Nothing
99-
_name = ""
100-
_kind = LSP.SymbolKind_File
101-
_range = range
102-
_selectionRange = range
103-
_children = Nothing
104-
_tags = Nothing
94+
defDocumentSymbol range = DocumentSymbol
95+
{ _detail = Nothing
96+
, _deprecated = Nothing
97+
, _name = ""
98+
, _kind = LSP.SymbolKind_File
99+
, _range = range
100+
, _selectionRange = range
101+
, _children = Nothing
102+
, _tags = Nothing
103+
}

test/testdata/schema/ghc98/default-config.golden.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"cabal": {
1212
"codeActionsOn": true,
1313
"completionOn": true,
14-
"diagnosticsOn": true
14+
"diagnosticsOn": true,
15+
"symbolsOn": true
1516
},
1617
"cabal-fmt": {
1718
"config": {

test/testdata/schema/ghc98/vscode-extension-schema.golden.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
"scope": "resource",
3636
"type": "boolean"
3737
},
38+
"haskell.plugin.cabal.symbolsOn": {
39+
"default": true,
40+
"description": "Enables cabal symbols",
41+
"scope": "resource",
42+
"type": "boolean"
43+
},
3844
"haskell.plugin.callHierarchy.globalOn": {
3945
"default": true,
4046
"description": "Enables callHierarchy plugin",

0 commit comments

Comments
 (0)