Comments (10)
OK, it now works, I added instructions on how to make it work with clj-kondo
.
from coc-diagnostic.
If you use this extension, you should use below option instead.
"diagnostic-languageserver.linters": { "clj-kondo": {...} }
for linters"diagnostic-languageserver.filetypes": { "clj":"clj-kondo", ... }
for enable linter for filetypes
from coc-diagnostic.
@iamcco, I tried as recommended:
{
"diagnostic-languageserver.linters": {
"clj-kondo": {
"command": "clj-condo",
"debounce": 100,
"args": [ "--lint", "%filepath"],
"offsetLine": 0,
"offsetColumn": 0,
"sourceName": "clj-kondo",
"formatLines": 1,
"formatPattern": [
"^[^:]+:(\\d+):(\\d+):\\s+([^:]+):\\s+(.*)$",
{
"line": 1,
"column": 2,
"message": 4,
"security": 3
}
],
"securities": {
"error": "error",
"warning": "warning",
"note": "info"
}
}
},
"diagnostic-languageserver.filetypes": { "clj":"clj-kondo", "clojure":"clj-kondo"}
}
It still does not seem to show anything. Are there diagnostics that I can run?
from coc-diagnostic.
Set "diagnostic-languageserver.trace.server": "verbose"
and checkout output channel
from coc-diagnostic.
I do get an error:
Error - 12:41:37 PM] [clojure] diagnostic handle fail: [clj-kondo] spawn clj-condo ENOENT
[Trace - 12:41:37 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
"uri": "file:///home/sporty/clojure/bubbleuptop/src/bubbleuptop/bubbleuptop.clj",
"diagnostics": []
}
Here is the full output:
from coc-diagnostic.
OK, does that mean my regex is wrong?
from coc-diagnostic.
Make sure command clj-condo
is in your $Path
environment.
from coc-diagnostic.
I checked and it is part of path:
[I] /home/sporty/clojure/bubbleuptop~> bash
sporty@vboxsporty:~/clojure/bubbleuptop$ clj-kondo --lint src/bubbleuptop/bubbleuptop.clj
src/bubbleuptop/bubbleuptop.clj:3:14: warning: namespace ring.middleware.reload is required but never used
src/bubbleuptop/bubbleuptop.clj:3:45: warning: #'ring.middleware.reload/wrap-reload is referred but never used
src/bubbleuptop/bubbleuptop.clj:7:16: warning: unused binding request
src/bubbleuptop/bubbleuptop.clj:14:6: warning: unused binding args
linting took 8ms, errors: 0, warnings: 4
sporty@vboxsporty:~/clojure/bubbleuptop$ which clj-kondo
/usr/local/bin/clj-kondo
sporty@vboxsporty:~/clojure/bubbleuptop$ echo $PATH
/home/sporty/.cargo/bin:/home/sporty/.local/bin:/home/sporty/.autojump/bin:/home/sporty/.local/bin:/home/sporty/go/bin:/usr/local/lib/nodejs/bin/:/home/sporty/.cargo/bin:/home/sporty/.local/bin:/home/sporty/.emacs.d/bin:/home/sporty/.vim/plugged/vim-iced/bin:/home/sporty/.yarn/bin:/home/sporty/.nix-profile/bin:/home/sporty/.cargo/bin:/home/sporty/.local/bin:/home/sporty/bin:/home/sporty/.nvm/versions/node/v14.2.0/bin:/home/sporty/.cargo/bin:/home/sporty/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/sporty/.fzf/bin
from coc-diagnostic.
So why you use clj-kondo
in terminal and clj-condo
in config?
from coc-diagnostic.
Gracious, that was the issue, thank you, it all now works.
from coc-diagnostic.
Related Issues (20)
- Lint errors should be removed on file write HOT 1
- How to enable _all_ supported filetypes? HOT 1
- Cannot make PHP-CS-Fixer work. HOT 3
- Could you support messageDelay about virtualtext? HOT 1
- Some linters do not mark any columns
- 警告信息全都高亮 HOT 1
- [sh] diagnostic handle fail: [shellcheck] Unexpected end of JSON input HOT 3
- [question] how to make default security be warning not error HOT 1
- Question: How to Set languageserver Options ? HOT 1
- Wrong working directory (phpcs) HOT 1
- [advice] how about use json to restore config.ts? HOT 2
- alex configuration not working HOT 2
- Floating error message not displaying with source code that uses tabs instead of spaces HOT 1
- golang 1.21 built-in function max and min cannot be recognized HOT 1
- Format on save HOT 5
- When multiple PHPStan and PHP_CodeSniffer errors are on the same line, they are not all displayed HOT 9
- High cpu usage with pylint HOT 2
- 请问可以设置linter的来源吗,我想要用flake8来检查,但是却无法去掉pyright HOT 2
- Adapting the color scheme for severity levels? HOT 1
- Diagnostic language service not running automatically HOT 2
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 coc-diagnostic.