Skip to content

Commit

Permalink
✨ Support petalinux
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Apr 7, 2024
1 parent 4ec1a87 commit 5ef1a90
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
- id: check-toml
- id: check-json
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
rev: v1.5.5
hooks:
- id: remove-crlf
- repo: https://github.com/codespell-project/codespell
Expand All @@ -47,7 +47,7 @@ repos:
hooks:
- id: check-mailmap
- repo: https://github.com/rhysd/actionlint
rev: v1.6.26
rev: v1.6.27
hooks:
- id: actionlint
- repo: https://github.com/adrienverge/yamllint
Expand Down
13 changes: 9 additions & 4 deletions src/bitbake_language_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
@self.feature(INITIALIZE)
def initialize(params: InitializeParams) -> None:
if params.root_path:
path = os.path.join(params.root_path, "conf/bitbake.conf")
if os.path.exists(path):
self.stash.AddFile(path)
self.show_message(f"Add {path}")
for filename in {
"conf/bitbake.conf",
"components/yocto/layers/poky/meta/conf/bitbake.conf",
}:
path = os.path.join(params.root_path, filename)
if os.path.exists(path):
self.stash.AddFile(path)
self.show_message(f"Add {path}")
return

@self.feature(TEXT_DOCUMENT_DID_OPEN)
@self.feature(TEXT_DOCUMENT_DID_CHANGE)
Expand Down

0 comments on commit 5ef1a90

Please sign in to comment.