Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#27] Provide option for configuration file location #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ export async function activate(context: ExtensionContext) {
workspace.createFileSystemWatcher('**/rebar.config'),
workspace.createFileSystemWatcher('**/rebar.lock')
]
},
initializationOptions: {
erlang: {
config_path: workspace.getConfiguration('erlang_ls').get('config.path'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we use camelCase for configPath this could be workspace.getConfiguration('erlang_ls').configPath, instead.

}
}
};

Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
"description":
"Override the default path of the erlang_ls executable with a custom one."
},
"erlang_ls.config.path": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the other names for the configuration values are using camelCase for the names, shouldn't we keep it that way for this configuration as well?

"type": "string",
"description": "Path to the erlang_ls.config file. This can either be absolute or relative to the project root",
"default": ""
},
"erlang_ls.logPath": {
"scope": "window",
"type": "string",
Expand All @@ -77,6 +82,7 @@
"default": "info",
"description": "Log level of LS server"
}

}
},
"languages": [
Expand Down