Skip to content

Language server doesn't work on newly created non-.ino files #93

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

Closed
per1234 opened this issue Dec 13, 2021 · 0 comments · Fixed by #95
Closed

Language server doesn't work on newly created non-.ino files #93

per1234 opened this issue Dec 13, 2021 · 0 comments · Fixed by #95
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Dec 13, 2021

Describe the bug

When a tab is created for a .cpp, .c, or .h file, no language server capabilities work in it. It only starts working after closing and reopening the sketch or changing the board selection.

To Reproduce

  1. Open a sketch in the Arduino IDE.
  2. Click the downward pointing triangle button on the right side of the tab bar.
  3. Select "New Tab" from the menu.
  4. In the "Name for new file" field, type foo.cpp.
  5. Click the OK button.
  6. Add some code to the foo.cpp tab that should produce some reaction from the language server. For example, this code:
    asdf
    should produce a red squiggly underline.
    Note that there is no language server capabilities in the file.
  7. Close the sketch.
  8. Open the sketch again.
    Note that the language server capabilities are now working as expected in foo.cpp.

Expected behavior

Language Server capabilities work in all types of sketch code files from creation on.

Desktop

  • OS: Windows 10
  • Arduino IDE Version: 2.0.0-rc2
    Date: 2021-12-13T10:09:39.122Z
    CLI Version: 0.20.2 [13783819]

Additional context

The issue does not occur when using Arduino Language Server version 0.5.0-rc2

Logs:
LSnew.zip

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Dec 13, 2021
@per1234 per1234 added the conclusion: resolved Issue was resolved label Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants