Skip to content

[BUG]: typos sometimes detected and sometimes not on words in python files #150

@jerabaul29

Description

@jerabaul29

Issue Description

I use codebook-lsp with helix - first, thank you for an amazing tool and contribution to the community!

One thing I wonder: why are typos sometimes reported, and sometimes not? Is it somehow linked to the "kind" of the word in the syntax tree? See the examples below and the screenshot:

Image

Operating System

Linux (Ubuntu/Debian)

Editor

Helix

Codebook Version

0.3.16

Configuration

[language-server.codebook]
command = "codebook-lsp"
args = ["serve"]

[[language]]
name = "python"
language-servers = ["ty", "ruff", "jedi", "pylsp", "codebook", "hx-lsp" ]

Steps to Reproduce

The dummy file I am using:

def some_func(a):
    "Some func is having typing issues"
    argwjh = a + " world"
    print(argwjh)


def iincorrect_name(a):
    print(a)


iincorrect_name(12)

iincorrect_var = "b"

Expected Behavior

Typos are not reported for:

iincorrect_name(12)

and

print(argwjh)

(see screenshot); I would expect these typos to be reported too.

Actual Behavior

The typos are sometimes reported, sometimes not, depending on the "role" of the mis-typed word.

Code Sample


Log Output

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions