lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
ericdallo 2021-01-14T02:36:01.000700Z

FYI: I removed the clojure-lsp autobump, next releases should contain one or more PRs/fixes

dharrigan 2021-01-14T06:56:15.001Z

:party-corgi:

1
dharrigan 2021-01-14T17:12:07.001600Z

Did I miss something? Now when I sort my namespaces, it reformats them too

dharrigan 2021-01-14T17:12:14.001800Z

from this

dharrigan 2021-01-14T17:12:17.002Z

(:require
    [foo.bar :as baz])

dharrigan 2021-01-14T17:12:40.002400Z

to

dharrigan 2021-01-14T17:12:54.002800Z

(:require [foo.bar :as baz])

ericdallo 2021-01-14T17:13:39.003200Z

Hum, we have a flag to toggle this behavior, it's called: :keep-require-at-start?

ericdallo 2021-01-14T17:13:49.003400Z

that is false by default

ericdallo 2021-01-14T17:14:14.003600Z

so it should indent to the first case if this flag is not set

dharrigan 2021-01-14T17:14:23.003800Z

oh, thanks breaking for me

ericdallo 2021-01-14T17:14:36.004Z

BTW, how do you are formatting your workspace?

dharrigan 2021-01-14T17:14:43.004200Z

shouldn't it keep the original behaviour, then toggle to the new behaviour?

ericdallo 2021-01-14T17:14:49.004400Z

via lsp-format-buffer or via the clean-ns code action?

dharrigan 2021-01-14T17:14:59.004600Z

Like this...(a moment)

dharrigan 2021-01-14T17:15:23.004800Z

nnoremap <silent> crcn :call CocRequest('clojure-lsp', 'workspace/executeCommand', {'command': 'clean-ns', 'arguments': [Expand('%:p'), line('.') - 1, col('.') - 1]})<CR>

ericdallo 2021-01-14T17:15:40.005Z

> shouldn't it keep the original behaviour, then toggle to the new behaviour? Yeah, this is the default behavior since implemented, maybe we introduced a bug with recent changes

ericdallo 2021-01-14T17:15:53.005200Z

via code actions then

dharrigan 2021-01-14T17:16:37.005400Z

I have this in my $HOME/.lsp/config.edn

dharrigan 2021-01-14T17:16:39.005600Z

:keep-require-at-start? true

ericdallo 2021-01-14T17:17:02.005900Z

that's why it's formatting as:

(:require [foo.bar :as baz])

ericdallo 2021-01-14T17:17:21.006100Z

you can fix your issue setting it to false or removing that line

dharrigan 2021-01-14T17:17:44.006400Z

fixed 🙂

dharrigan 2021-01-14T17:17:46.006600Z

set to false

dharrigan 2021-01-14T17:17:49.006800Z

Thank you! 🙂

ericdallo 2021-01-14T17:18:07.007Z

You're welcome 😉

dharrigan 2021-01-14T17:18:21.007200Z

btw, very happy you're rolling up the releases now 🙂

dharrigan 2021-01-14T17:18:40.007400Z

I had panic attacks looking at my emails to see notifications of new releases 🙂

dharrigan 2021-01-14T17:18:56.007600Z

less churn in the arch world

ericdallo 2021-01-14T17:18:58.007800Z

yeah, it was annoying me too 😅

ericdallo 2021-01-14T17:19:37.008Z

I'm not sure the process is working 100% though, but let' see

ericdallo 2021-01-14T17:19:54.008200Z

BTW I'll release a necessary fix right now 😂

dharrigan 2021-01-14T17:20:04.008400Z

I can cope 🙂

borkdude 2021-01-14T17:42:11.008800Z

@snoe This looks a bit suspicious:

borkdude 2021-01-14T17:43:24.009200Z

Also this:

borkdude 2021-01-14T17:43:55.010100Z

I probably should have given this feedback before I merged ;)

borkdude 2021-01-14T17:44:50.010400Z

@snoe Anyway, maybe you could fix these:

$ ./clj-kondo --lint src test
src/clj_kondo/impl/analyzer/namespace.clj:431:15: warning: unused binding meta-name
test/clj_kondo/analysis_test.clj:99:46: warning: unused binding locals
test/clj_kondo/analysis_test.clj:99:54: warning: unused binding local-usages
linting took 1115ms, errors: 0, warnings: 3

snoe 2021-01-14T17:45:33.010600Z

yes, sorry about that

snoe 2021-01-14T17:58:15.011200Z

@borkdude would you like a new pr or ?

borkdude 2021-01-14T17:59:15.011400Z

yes please?

borkdude 2021-01-14T17:59:35.011600Z

I'm not sure if these are errors in your code, since meta-name wasn't used at all

snoe 2021-01-14T18:00:54.011800Z

yeah, it wasn't needed. unfortunately I'm working in the dark ages as I've blown up my lsp to do this stuff :)

borkdude 2021-01-14T18:33:07.012300Z

:thumbsup:

borkdude 2021-01-14T18:54:03.012500Z

@snoe You can always enable clj-kondo via old-fashioned flycheck + the installed binary