Comments (5)
@jose-elias-alvarez you're right, disable gitsigns works.
I enable gitsigns' code action because I'm curious what it provides, I don't actually use it so disabling it is fine for me.
Thanks for the quick help and great plugin, it's faster than efm
and easier to config IMO, hope it will get more mature in the future.
from null-ls.nvim.
Hey! You're right about the expected behavior, and in fact I pushed a commit in the past couple of days that solved an issue causing null-ls to attach to all buffers. Are you still seeing this behavior on the latest commit?
from null-ls.nvim.
Sorry, forgot to close this one. Works as expected! Thanks!
from null-ls.nvim.
hi @jose-elias-alvarez, I'm getting the same issue, I'm using dartls (akinsho/flutter-tools)
I have this autocmd to run format on save when in dart buffer:
autocmd BufWritePre *.dart lua vim.lsp.buf.formatting_sync({}, 200)
Every time I save a dart buffer, neovim prompts me to choose between dartls
and null-ls
.
I also see null-ls
in :LspInfo
output.
How do I make null-ls
ignore every filetype but the ones in the null-ls
configuration?
My null-ls
config:
local null_ls = require("null-ls")
local sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.code_actions.gitsigns,
}
null_ls.setup({ sources = sources })
I also use your nvim-lsp-ts-utils
plugin to integrate eslint
and prettierd
with null-ls.
from null-ls.nvim.
@nghialm269 Judging from your config, your issue is actually a bit different – it's because the Gitsigns builtin is enabled for all filetypes by default, and null-ls currently cannot recognize that it's not able to respond to the formatting request. This is something I want to work on when I have a little time, though, so I've opened up #28.
Edit: a (lousy) workaround for now is to specifically define the filetypes you want to use with Gitsigns:
null_ls.builtins.code_actions.gitsigns.with({ filetypes = { ... } })
Not a great workaround, though, and if I'm not wrong it shouldn't be too hard to fix it at the plugin level without workarounds, so keep an eye on the issue.
from null-ls.nvim.
Related Issues (20)
- Support fbinfer static analysis tool
- Support for pmd/cpd static analysis tool HOT 2
- Support for NASA's Ikos static analyzer
- Add support for typst HOT 2
- Support for PMD 7.x HOT 2
- latex: chktex and proselint cause delay in `gq` formatting HOT 2
- null-ls trying to use user folder as command name on windows HOT 1
- It is very inconvenient that I cannot see the documentation with the help command HOT 1
- Feature request: Only show diagnostics on modified lines HOT 2
- [eslint] failed to decode json: Expected value but found invalid token at character 2() HOT 3
- Code Actions not working (tested on gitsigns) HOT 3
- PrismaFmt built-in replaces the content of schema.prisma file
- Add an option to activate source only if a configuration is found in the project HOT 4
- Full restart of null-ls HOT 4
- goimports-reviser with `-rm-unused` removes the module that not in go.mod
- Mypy fails when buffer is not yet saved
- IMPORTANT: Archiving null-ls HOT 110
- Null-ls is not registering any sources HOT 1
- When registering a source, condition should recursively from current file dir to root
- UTF-8 characters break diagnostics' underline position
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from null-ls.nvim.