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

105$: [nvim-lspconfig] Only lint on insert with quick-lint #909

Closed
vegerot opened this issue Jan 16, 2023 · 11 comments
Closed

105$: [nvim-lspconfig] Only lint on insert with quick-lint #909

vegerot opened this issue Jan 16, 2023 · 11 comments
Assignees
Labels
for hire Get paid for working on this task: https://quick-lint-js.com/hiring.html

Comments

@vegerot
Copy link
Sponsor Contributor

vegerot commented Jan 16, 2023

The vim docs for quick-lint say that I can lint while in insert mode. However, while quick-lint is quick, most of my other linters are not quick. Is there a way to lint in insert mode for only quick-lint? The docs only describe how to do it for all linters:

    vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
      vim.lsp.diagnostic.on_publish_diagnostics, {
        update_in_insert = true,
      }
    )
@strager
Copy link
Collaborator

strager commented Jan 16, 2023

Great idea!

@strager strager added the for hire Get paid for working on this task: https://quick-lint-js.com/hiring.html label Jan 16, 2023
@strager strager changed the title [nvim-lspconfig] Only lint on insert with quick-lint 5$: [nvim-lspconfig] Only lint on insert with quick-lint Jan 16, 2023
@vegerot
Copy link
Sponsor Contributor Author

vegerot commented Apr 22, 2023

please add an extra $100 to this issue (from me)

@vegerot
Copy link
Sponsor Contributor Author

vegerot commented Apr 22, 2023

found a question on StackOverflow asking pretty much the same thing https://vi.stackexchange.com/questions/41975/enable-update-in-insert-only-for-certain-extensions

@vegerot
Copy link
Sponsor Contributor Author

vegerot commented Apr 22, 2023

off-topic: I found a shorter version of this by reading the neovim help pages

vim.diagnostic.config({
	update_in_insert = true,
})

on-topic: I only skimmed it, but the docs mention (diagnostics.txt):

1. Create a namespace |nvim_create_namespace()|. Note that the namespace must
   have a name. Anonymous namespaces WILL NOT WORK.
2. (Optional) Configure options for the diagnostic namespace
   |vim.diagnostic.config()|.
3. Generate diagnostics.
4. Set the diagnostics for the buffer |vim.diagnostic.set()|.
5. Repeat from step 3.

I don't know what a "namespace" is, but it sounds promising. Could we make a quick-lint namespace?

@vegerot vegerot changed the title 5$: [nvim-lspconfig] Only lint on insert with quick-lint 105$: [nvim-lspconfig] Only lint on insert with quick-lint Apr 22, 2023
@strager
Copy link
Collaborator

strager commented Apr 26, 2023

Could we make a quick-lint namespace?

I suspect that a namespace is for plugins like nvim-lspconfig, not for plugins (LSP servers) like quick-lint-js. But perhaps nvim-lspconfig creates one namespace for each registered LSP server?

@RossBarnie
Copy link
Contributor

@strager I claim this for-hire task. I expect payment after I complete this task. I will email the quick-lint-js team if I am assigned this task.

@strager
Copy link
Collaborator

strager commented Sep 8, 2023

@RossBarnie The title has a mistake because the reporter is an asshole. The dollar amount was intended to be 5$, not 105$.

I think 15$ is more appropriate. Do you agree to 15$?

@RossBarnie
Copy link
Contributor

Yes I agree to $15.

@vegerot
Copy link
Sponsor Contributor Author

vegerot commented Sep 8, 2023

I also intend on adding $100. We'll talk payment methods after it's completed. You like Walmart gift cards?

@vegerot
Copy link
Sponsor Contributor Author

vegerot commented Sep 19, 2023

I'll try this out tomorrow and send the money :)

@vegerot
Copy link
Sponsor Contributor Author

vegerot commented Sep 1, 2024

@RossBarnie it works! But you don't have Sponsors enabled :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for hire Get paid for working on this task: https://quick-lint-js.com/hiring.html
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants