diff options
Diffstat (limited to 'src/server/requests.odin')
| -rw-r--r-- | src/server/requests.odin | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/server/requests.odin b/src/server/requests.odin index 35a2865..3da2d6c 100644 --- a/src/server/requests.odin +++ b/src/server/requests.odin @@ -443,6 +443,20 @@ read_ols_initialize_options :: proc( ) } + for profile in ols_config.profiles { + if ols_config.profile == profile.name { + if filepath.is_abs(ols_config.profile) { + config.profile.checker_path = strings.clone( + profile.checker_path, + ) + } else { + config.profile.checker_path = path.join( + elems = {uri.path, profile.checker_path}, + ) + } + } + } + config.checker_targets = slice.clone( ols_config.checker_targets, context.allocator, @@ -1146,11 +1160,10 @@ notification_did_save :: proc( log.errorf("failed to collect symbols on save %v", ret) } - if uri, ok := common.parse_uri( - config.workspace_folders[0].uri, - context.temp_allocator, - ); ok { - check(uri, writer, config) + if config.profile.checker_path != "" { + check(config.profile.checker_path, writer, config) + } else { + check(config.workspace_folders[0].uri, writer, config) } return .None |