Skip to content

Commit

Permalink
Add changelog entry, disable symbol resolution by default
Browse files Browse the repository at this point in the history
  • Loading branch information
JojOatXGME committed Oct 20, 2024
1 parent 65efe86 commit b6c291b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

### Added

- Experimental support for resolving variables.
The feature is disabled by default since the functionality is rather limited for now.
Feel free to comment your feedback at [issue #87](https://github.com/NixOS/nix-idea/issues/87).

### Changed

### Deprecated
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/nixos/idea/settings/NixSymbolSettings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.nixos.idea.settings.SimplePersistentStateComponentHelper.delegate
class NixSymbolSettings : SimplePersistentStateComponent<NixSymbolSettings.State>(State()) {

class State : BaseState() {
var enabled by property(true)
var enabledPreview by property(false)
var jumpToFirstDeclaration by property(false)
var showDeclarationsAsUsages by property(false)
}
Expand All @@ -23,7 +23,7 @@ class NixSymbolSettings : SimplePersistentStateComponent<NixSymbolSettings.State
}
}

var enabled: Boolean by delegate(State::enabled)
var enabled: Boolean by delegate(State::enabledPreview)
var jumpToFirstDeclaration by delegate(State::jumpToFirstDeclaration)
var showDeclarationsAsUsages: Boolean by delegate(State::showDeclarationsAsUsages)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ abstract class AbstractSymbolNavigationTests {
val declarationMarkers = markers.markers(TAG_DECL)
val referenceMarkers = markers.markers(TAG_REF)

NixSymbolSettings.getInstance().enabled = true
val file = myFixture.configureByText(NixFileType.INSTANCE, unmarkedCode)
PsiTestUtil.checkErrorElements(file) // Fail early if there is a syntax error

Expand Down

0 comments on commit b6c291b

Please sign in to comment.