mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-10 20:30:24 +00:00
fix: NPE when code completion parser not supported
This commit is contained in:
parent
cdb0d7b7ad
commit
7a802cee97
1 changed files with 4 additions and 1 deletions
|
|
@ -57,7 +57,10 @@ object CompletionUtil {
|
|||
getFormattedCompletion(adjustedText, tempFile, document, editor)
|
||||
|
||||
return if (service<ConfigurationSettings>().state.codeCompletionSettings.treeSitterProcessingEnabled) {
|
||||
CodeCompletionParserFactory.getParserForFileExtension(originalFile.extension)
|
||||
val parser =
|
||||
CodeCompletionParserFactory.getParserForFileExtension(originalFile.extension)
|
||||
?: return formattedCompletion
|
||||
parser
|
||||
.parse(textBeforeCompletion, textAfterCompletion, formattedCompletion)
|
||||
.trimEnd()
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue