Skip to content

Incorrect examples in the default LSP Server configuration. #92

Closed
@DKnoto

Description

@DKnoto

Description:
Incorrect examples in the default configuration of the LSP server cause errors that are difficult to detect. Removing them for a person with little experience in Apache NetBeans can cause a lot of frustration.

Steps to reproduce the behavior:

  1. Make a fresh installation of netbeansPython;
  2. Set the right margin to 120 characters, Options/Editor/Formatting/RightMargin [120];
  3. Make a fresh project e.g. PythonProject1;
  4. Edit main.py;
  5. Add "Lorem ipsum dolor … est laborum." in line 7, print function;

netbeansPython-1 5-Line-to-Long-A-c128

  1. Check the line length configurations in the LSP server:

netbeansPython-1 5-Line-to-Long-B-c128

netbeansPython-1 5-Line-to-Long-C-c128

netbeansPython-1 5-Line-to-Long-D-c128

Unfortunately, we have two different forms and three different values. The inscriptions representing the number prevail.

  1. I set the desired length by selecting the majority form:

netbeansPython-1 5-Line-to-Long-E-c128

  1. The effect in the editor seems to be correct, the warnings disappear:

netbeansPython-1 5-Line-to-Long-F-c128

  1. Just to be sure, I check if a warning appears if I exceed the new length, which is 120 characters:

netbeansPython-1 5-Line-to-Long-G-c128

And here is the problem, the setting is not correct. We are looking for an error message.

  1. Unfortunately, the error window of the LSP server environment is empty:

netbeansPython-1 5-Line-to-Long-H-c128

  1. Fortunately, a log and the cause of the error can be found in the configuration directory of the LSP server:

netbeansPython-1 5-Line-to-Long-I-c128

  1. We correct the string "120" to the number 120:

netbeansPython-1 5-Line-to-Long-J-c128

  1. And eventually we achieve the desired effect:

netbeansPython-1 5-Line-to-Long-K-c128

Expected behavior:

Numeric values in the default LSP configuration should be stored as numbers. Ideally, a validation of this configuration should be done before closing the dialog and informing the user of any errors. The LSP server logs should be visible in the corresponding IDE output window.

Desktop:

  • OS: Linux Fedora 37 ppc64le 6.5.12-100
  • JDK Version: OpenJDK 17.0.8+7
  • Netbeans Version: 19
  • Python Plugin Version: 1.5

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfixed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions