This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-20
Channels
- # admin-announcements (1)
- # announcements (1)
- # beginners (115)
- # calva (31)
- # cider (25)
- # clj-kondo (47)
- # cljdoc (23)
- # cljs-dev (5)
- # clojars (1)
- # clojure (60)
- # clojure-australia (1)
- # clojure-europe (23)
- # clojure-nl (3)
- # clojure-norway (2)
- # clojure-spec (3)
- # clojure-uk (18)
- # clojurescript (49)
- # community-development (1)
- # cursive (4)
- # datahike (2)
- # datascript (3)
- # datomic (36)
- # deps-new (2)
- # emacs (2)
- # events (9)
- # fulcro (6)
- # graphql (2)
- # gratitude (13)
- # holy-lambda (1)
- # introduce-yourself (10)
- # macro (2)
- # malli (5)
- # meander (9)
- # news-and-articles (5)
- # nextjournal (1)
- # off-topic (32)
- # pathom (17)
- # pedestal (13)
- # polylith (4)
- # protojure (4)
- # reagent (4)
- # sci (27)
- # shadow-cljs (2)
- # show-and-tell (2)
- # specter (3)
- # tools-deps (7)
- # xtdb (16)
I have a false-positive from clj-kondo that I'd like to understand if it's an issue or not ๐งต
(ns foo
(:require
[clojure.string :refer [split-lines]])) ;; gives unused-namespace + unured-reffered-var
#?(:clj
(split-lines ""))
If I move the require to a #?(:clj )
it works, but that way should work as well, right?
clojure-lsp removes the require from ns when the require is unused, this kind of issue could be really bad for clojure-lsp clean-ns feature ๐
I see the problem, but I think the analysis info provides enough info for the clean-ns to not remove this: e.g. one usage is enough to not clean it
from the clj-kondo perspective: the linting happens twice, once for the clj branches and once for the cljs branches
even if we fix on clojure-lsp, it's still a warning on clj-kondo that is a false-positive ๐
> from the clj-kondo perspective: the linting happens twice, once for the clj branches and once for the cljs branches Is that easy to fix?
no, this is not an issue, it is just how it works and how it has always works: it's intended
it is unused in cljs. there's an issue to add to the linting "cljs" so it's more clear
I would prefer not to check the analysis for performance reasons as ATM we are only relying on findings
and if there are not two the same findings for both languages, you should not remove?
yeah, that would be the perfect from clojure-lsp view, but that other idea of enhance the findings would work as well I think
with the enhanced findings you would not be depending on what the user would configure, so that seems more stable right?
another thing to look out for is when we will change the message to include the language (clj or cljs) then LSP should only look at other fields like :lang and :ns and :name perhaps
Hey, what's the easiest way to setup neovim with clojure-lsp? neovim now has the lsp client built in right?
I want @U051N6TTC to try out clojure-lsp ;)
Perhaps @U11EL3P9U knows?
Maybe @UMMMKKADU knows, he uses nvim
She can check this: https://clojure-lsp.github.io/clojure-lsp/clients/#vim
I'm using a super fancy nvim/fennel setup, but as @UKFSJSM38 said Nvim 0.5 has a built-in LSP and you just need a plugin to setup which is this one: https://github.com/neovim/nvim-lspconfig
This in company of https://github.com/hrsh7th/nvim-compe for auto completion and https://github.com/nvim-telescope/telescope.nvim#neovim-lsp-pickers for fancy menus and pickers is all you need
coc-nvim bundles all of this in one, but is written in nodejs, people is jumping out