Skip to content

Commit

Permalink
👽 Add classifiers for stash.GetItemsFor()
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Dec 29, 2023
1 parent da45d56 commit 9cb9ef5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env -S pip install -r

oelint-parser
# stash.GetItemsFor(classifier=[])
oelint-parser >= 2.13.0
pygls
10 changes: 6 additions & 4 deletions src/bitbake_language_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ def completions(params: CompletionParams) -> CompletionList:
),
insert_text=item.VarName,
)
for item in self.stash.GetItemsFor(classifier="Variable")
+ self.stash.GetItemsFor(classifier="TaskAssignment")
for item in self.stash.GetItemsFor(
classifier=["Variable", "TaskAssignment"]
)
if item.VarName.startswith(word)
]
items += [
Expand All @@ -204,8 +205,9 @@ def completions(params: CompletionParams) -> CompletionList:
),
insert_text=item.FuncName,
)
for item in self.stash.GetItemsFor(classifier="Function")
+ self.stash.GetItemsFor(classifier="PythonBlock")
for item in self.stash.GetItemsFor(
classifier=["Function", "PythonBlock"]
)
if item.FuncName.startswith(word)
]
return CompletionList(False, items)
Expand Down

0 comments on commit 9cb9ef5

Please sign in to comment.