Skip to content
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

What file extensions are supported ? #320

Open
motorto opened this issue Dec 19, 2024 · 3 comments
Open

What file extensions are supported ? #320

motorto opened this issue Dec 19, 2024 · 3 comments
Assignees
Labels
harper-ls question Further information is requested

Comments

@motorto
Copy link

motorto commented Dec 19, 2024

Summary

The harper_ls language server, as documented in the [nvim-lspconfig documentation](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#harper_ls), is supposed to support the following file types:

{ "c", "cpp", "cs", "gitcommit", "go", "html", "java", "javascript", "lua", "markdown", "nix", "python", "ruby", "rust", "swift", "toml", "typescript", "typescriptreact" }

However, while it works correctly for markdown and lua files, no errors are being reported for other file types, even when no other LSP is active for the file.

Steps to Reproduce

  1. Open a supported file type (e.g., python, c, etc.) in Neovim.
  2. Ensure that no other LSP server is active for the file.
  3. Introduce a syntax error or invalid code.
  4. Observe the absence of error reporting by harper_ls.

Observed Behavior

  • harper_ls works correctly for markdown files (errors are reported as expected).
  • No errors or diagnostics are reported for other supported file types.

Expected Behavior

  • harper_ls should provide diagnostics and error reporting for all supported file types listed in the documentation.

Environment

  • Neovim Version: NVIM v0.10.2
  • OS: fedora 41

Additional Notes

  • The issue does not appear to be configuration-specific, as the server initializes without errors.
  • This behavior persists across multiple supported file types (python, c, etc.).
@grantlemons
Copy link
Contributor

Harper doesn't aim to correct syntax errors or invalid code, that is the role of a language specific lsp. Those languages are "supported" because it will spellcheck comments on files of those types.

@elijah-potter elijah-potter self-assigned this Dec 20, 2024
@elijah-potter elijah-potter added question Further information is requested harper-ls labels Dec 20, 2024
@elijah-potter
Copy link
Collaborator

Hey @motorto,

It sounds like you're concerned because you are not getting language diagnostics when you provide invalid code to harper-ls. Does that sound right?

That's actually entirely expected. Harper doesn't aim to fix you're code, but rather your comments. Harper is actually a grammar checker, designed to make your non-code text easier to read and be understood by other people on your team.

If you want confirmation that it's working, try adding a comment containing "This is an test". You should be getting diagnostics to fix it.

Hope your day goes well :). Let me know if that answered your question so I can go ahead and close this ticket.

@motorto
Copy link
Author

motorto commented Dec 20, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
harper-ls question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants