Comments (2)
Whoops I thought I did add this but guess I didn't get around to it π
Thanks for pointing it out!
from efmls-configs-nvim.
Edit: I was mistaken. I didn't realize that sqlfluff gives a non-zero exit code when it finds anything to lint. Probably better to just override the command once like so if you want a config file to work
local which_sqlfluff = fs.executable("sqlfluff")
-- I'd prefer that dialect was set from the nearest sqlfluff file
local sqlfluff_command =
string.format("%s lint --format github-annotation-native --annotation-level warning --nocolor --disable-progress-bar ${INPUT}", which_sqlfluff)
sqlfluff = vim.tbl_extend("force", sqlfluff, { lintCommand = sqlfluff_command })
Just commenting my gross config to have the command read from a .sqlfluff config file if it's available if it helps anyone:
local which_sqlfluff = fs.executable("sqlfluff")
-- I'd prefer that dialect was set from the nearest sqlfluff file
local sqlfluff_main_command =
string.format("%s lint --format github-annotation-native --annotation-level warning --nocolor --disable-progress-bar ${INPUT}", which_sqlfluff)
-- If it fails default to ANSI
local sqlfluff_backup_command =
string.format("%s lint --dialect ansi --format github-annotation-native --annotation-level warning --nocolor --disable-progress-bar ${INPUT}", which_sqlfluff)
local sqlfluff_command = string.format("%s || %s", sqlfluff_main_command, sqlfluff_backup_command)
sqlfluff = vim.tbl_extend("force", sqlfluff, { lintCommand = sqlfluff_command })
from efmls-configs-nvim.
Related Issues (20)
- Prettier config out of date HOT 4
- More declarative approach to settings extra args? HOT 2
- how to config the swiftformat for efmls? I can't understand different formatter configuration in source code. HOT 5
- Prettier, Prettierd: tabWidth property in the config file's ignored HOT 3
- Unclear how to partially override `efmls-configs` HOT 2
- How to remove stdout ? (Trying to add my custom formatter) HOT 1
- [feature request] Exclude langs completely from default without `:checkhealth` complaining. HOT 3
- Pint php formatter writes output to buffer HOT 2
- clang format deletes changes on write HOT 5
- [Question|Help] Why my stylua is not working? HOT 8
- :checkhealth makes the plugin look broken HOT 1
- Formatter does not reflect changes to the buffer HOT 2
- Any interest in merging support for sql-formatter? HOT 5
- Provide all the tools and their configuration for relevant filetypes as a provider
- Feature request: Use mason-installed, non pip/node executables when available HOT 10
- [ERROR][2023-10-10 13:12:33] .../vim/lsp/rpc.lua:675 "rpc" "/home/w/.local/share/nvim/mason/bin/efm-langserver" "stderr" "2023/10/10 13:12:33 nil --color Never -: sh:θ‘1: nilοΌζͺζΎε°ε½δ»€\n\n" HOT 4
- `:checkhealth` is broken HOT 6
- Adopt formatter/linter commands from dead `null-ls` HOT 3
- Use project installed ESLint HOT 7
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 efmls-configs-nvim.