Language Server Protocol implementation for 1C (BSL) - 1C:Enterprise 8 and OneScript languages.
- Contributing guidelines
- Capabilities
- Run from command line
- Run in analyzer mode
- Run in formatter mode
- Configuration file
- Reporters
- Diagnostics
- Features
- Frequently asked questions
- System requirements
- Acknowledgments
Perfomance measurement - SSL 3.1
- File formatting
- Selected region formatting
- Symbol definition for current file (regions, procedures, functions, variables, defined via
Var
keyword) - Folding regions definition
#Region
,#If
, procedures and functions, code blocks, queries - Methods "Cognitive Complexity" and "Cyclomatic Complexity" scores
- Tooltip on local methods and methods of common / manager modules
- Go to method definitions
- Finding places to use methods
- Method call hierarchy
- Expand selection
- Display color representation and convert between
Color and
WebColors` - Diagnostics
- Quick fixes for several diagnostics
- Run diagnostics engine from command line
- Run formatter engine from command line
??? workspace
Operation | Supported | Comment |
---|---|---|
didChangeWorkspaceFolders | ||
didChangeConfiguration | with restrictions, see #1431 | |
didChangeWatchedFiles | ||
symbol | ||
executeCommand | ||
applyEdit | ||
willCreateFiles |
??? "Text Synchronization"
Opertaion | Supported | Comment |
---|---|---|
didOpen | ||
didChange | textDocumentSyncKind = Full | |
didClose | ||
didSave | ||
willSave | ||
willSaveWaitUntil |
??? textDocument
Operation | Supported | Comment | Configurable? |
---|---|---|---|
publishDiagnostics | tagSupport = true versionSupport = true список диагностик |
yes | |
completion | resolveProvider = false | ||
completionItem/resolve | |||
hover | contentFormat = MarkupContent | ||
signatureHelp | |||
declaration | not applicable in 1C:Enterprise | ||
definition | linkSupport = true | ||
typeDefinition | |||
implementation | not applicable in 1C:Enterprise | ||
references | |||
documentHighlight | |||
documentSymbol | hierarchicalDocumentSymbolSupport = true | ||
codeAction | codeActionKinds = ? (see #1433) isPreferredSupport = true |
yes | |
codeAction/resolve | |||
codeLens | resolveProvider = false | да | |
codeLens/resolve | |||
codeLens/refresh | |||
documentLink | Displaying hyperlinks to diagnostics documentation. tooltipSupport = true resolveProvider = false |
yes | |
documentLink/resolve | |||
documentColor | |||
colorPresentation | |||
formatting | |||
rangeFormatting | |||
onTypeFormatting | |||
rename | |||
prepareRename | |||
foldingRange | |||
selectionRange | |||
prepareCallHierarchy | |||
callHierarchy/incomingCalls | |||
callHierarchy/outgoingCalls | |||
semanticTokens | |||
linkedEditingRange | |||
moniker |
jar-files run through java -jar path/to/file.jar
.
java -jar bsl-language-server.jar --help
BSL language server
Usage: bsl-language-server [-h] [-c=<path>] [COMMAND [ARGS]]
-c, --configuration=<path>
Path to language server configuration file
-h, --help Show this help message and exit
Commands:
analyze, -a, --analyze Run analysis and get diagnostic info
format, -f, --format Format files in source directory
version, -v, --version Print version
lsp, --lsp LSP server mode (default)
Starting BSL Language Server in standard mode will run the Language Server communicating via [LSP](language server protocol). stdin and stdout are used for communication.
By default diagnostics texts are displayed in Russian. To switch the diagnostics text language you need to set parameter language
in configuration file or raise an event workspace/didChangeConfiguration
:
To run in analyzer mode use parameter --analyze
(short -a
).
Usage: bsl-language-server analyze [-hq] [-c=<path>] [-o=<path>] [-s=<path>]
[-r=<keys>]...
Run analysis and get diagnostic info
-c, --configuration=<path>
Path to language server configuration file
-h, --help Show this help message and exit
-o, --outputDir=<path> Output report directory
-q, --silent Silent mode
-r, --reporter=<keys> Reporter key (console, junit, json, tslint, generic)
-s, --srcDir=<path> Source directory
-w, --workspaceDir=<path>
Workspace directory
To set source code folder for analysis use parameter --srcDir
(short -s
) followed by the path (relative or absolute) to the source code folder.
To generate an analysis report you need to specify one or more reporters. To specify reporter use parameter --reporter
or -r
, followed by reporter key. You may specify several reporters. The list of reporters see in section Reporters.
Command line example to run analysis:
java -jar bsl-language-server.jar --analyze --srcDir ./src/cf --reporter json
When run analysis for large code base it is recommended to set parameter {code0}-Xmx{/code0} to set maximum limit of memory being allocated to java process. The size of allocated memory depends on the size of code base for analysis.
java -Xmx4g -jar bsl-language-server.jar ... other parameters
To run in formatter mode use parameter --format
(short -f
).
Usage: bsl-language-server format [-hq] [-s=<path>]
Format files in source directory
-h, --help Show this help message and exit
-q, --silent Silent mode
-s, --src=<path> Source directory or file
To set source code folder (or source file) for formatting use parameter --src
(short -s
) followed by the path (relative or absolute) to the source code folder (or file).
Command line example to run formatting:
java -jar bsl-language-server.jar --format --src ./src/cf
A detailed description of the configuration file is given on this page
Many thanks to all contributors to the project, to all who participated in the discussions, who helped with the testing.
You are awesome!
Thanks to companies supporting open source projects, and especially to those who supported us:
YourKit, LLC is the creator of innovative and intelligent tools for profiling Java
and .NET
applications. YourKit has offered an open source license YourKit Java Profiler for BSL Language Server
to improve its performance.
With YourKit Java Profiler
we profile and improve project performance.
JetBrains is the creator of professional software for development. JetBrains has offered an open source license for his products, including IntelliJ IDEA Ultimate
.
IntelliJ IDEA Ultimate
is one of the best tools in its class.