Skip to content

Commit

Permalink
Merge pull request #466 from BradLewis/master
Browse files Browse the repository at this point in the history
Add documentation for enabling references and fix enable_rename config flag
  • Loading branch information
DanielGavin authored Aug 10, 2024
2 parents 8726748 + 0fecc74 commit 13f93e1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ Options:

`enable_checker_only_saved`: Turns on only calling the checker on the package being saved.

`enable_references`: Turns on finding references for a symbol.

`enable_rename`: Turns on renaming a symbol.

`odin_command`: Allows you to specify your Odin location, instead of just relying on the environment path.

`checker_args`: Pass custom arguments to `odin check`.
Expand Down
3 changes: 2 additions & 1 deletion src/server/requests.odin
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ read_ols_initialize_options :: proc(config: ^common.Config, ols_config: OlsConfi
config.enable_references = ols_config.enable_references.(bool) or_else config.enable_references
config.verbose = ols_config.verbose.(bool) or_else config.verbose
config.file_log = ols_config.file_log.(bool) or_else config.file_log
config.enable_rename = ols_config.enable_references.(bool) or_else config.enable_rename

config.enable_rename = ols_config.enable_rename.(bool) or_else config.enable_rename

config.enable_procedure_snippet =
ols_config.enable_procedure_snippet.(bool) or_else config.enable_procedure_snippet
Expand Down
1 change: 1 addition & 0 deletions src/server/types.odin
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ OlsConfig :: struct {
enable_inlay_hints_params: Maybe(bool),
enable_inlay_hints_default_params: Maybe(bool),
enable_references: Maybe(bool),
enable_rename: Maybe(bool),
enable_fake_methods: Maybe(bool),
enable_procedure_snippet: Maybe(bool),
enable_checker_only_saved: Maybe(bool),
Expand Down

0 comments on commit 13f93e1

Please sign in to comment.