This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-25
Channels
- # announcements (14)
- # aws (1)
- # babashka (23)
- # beginners (442)
- # calva (50)
- # chlorine-clover (1)
- # cider (32)
- # clojure (124)
- # clojure-europe (35)
- # clojure-france (5)
- # clojure-gamedev (5)
- # clojure-nl (2)
- # clojure-portugal (3)
- # clojure-uk (4)
- # clojurescript (56)
- # conjure (5)
- # cursive (24)
- # datalevin (1)
- # datomic (57)
- # fulcro (35)
- # helix (15)
- # holy-lambda (8)
- # introduce-yourself (1)
- # jobs (5)
- # kaocha (1)
- # lsp (99)
- # malli (10)
- # music (1)
- # off-topic (22)
- # pathom (38)
- # podcasts-discuss (10)
- # polylith (10)
- # reitit (1)
- # releases (1)
- # remote-jobs (4)
- # shadow-cljs (18)
- # spacemacs (6)
- # tools-build (22)
- # vim (66)
- # xtdb (22)
So far everyone for conjure and most for CoC. Just what you ended up with, or something missing in other solutions?
Had a quick peek at iced, but couldn't figure out how I could have a persistent repl window, or in fact anything larger than what fits in the command line. Stdout is not tenable either for peeking into things that don't print anything (like most). So onto testing conjure now
I was a Fireplace user for a long time, had tried out iced and not taken to it. Tried out Conjure and immediately liked the log buffer approach. Conjure introduced me to CoC for completion and then I added config for clojure-lsp because it supported it. Might try out native LSP at some point, but I like my config as it is right now.
This is what I use to replace CoC: • https://github.com/neovim/nvim-lspconfig • https://github.com/hrsh7th/nvim-cmp (autocomplete) • https://github.com/nvim-telescope/telescope.nvim (pickers) And conjure for sure :)
It's pretty easy find all the alternatives, but there doesn't seem to be any discussion about the tradeoffs you would make with different choices
One trade off that I can see is that CoC is written in node, and so I've had to make sure it was installed. If you already need node, then it's nbd, but if not, it's another thing to install. In a perfect world, I would like a CoC-like thing that doesn't need node, but I am grateful for my imperfect world where I can do completions and refactor and get incoming/outgoing callers.
@UMMMKKADU I have a similar setup as yours. I am using coc only for renaming symbols. Did you find a way to rename symbols with nvim-lspconfig?
you mean the autocompletion symbols?
Some people tends to say that the native LSP is faster because CoC is made in node, but I do pairs with my coworkers that use coc and I don't see significant impact on the daily usage, just a few seconds on the lsp starup time. One downside of coc is that is one lib to rule most of your setup, so can be harder to experiment with new plugins, but at the same time if you don't want to get into a quest searching for the best plugin combo is a no brainer go to coc.
TL;DR both good hahaha
@U0L91U7A8 if you talking about autocompletion symbols I do this to "rename" https://github.com/rafaeldelboni/nvim-fennel-lsp-conjure-as-clojure-ide/blob/main/.config/nvim/fnl/config/plugin/cmp.fnl#L5-L8
with pure lua you can do like this: https://github.com/hrsh7th/nvim-cmp#how-to-show-name-of-item-kind-and-source-like-compe
@UMMMKKADU I am not talking about autocompletion but renaming like e.g. renaming a function and all its usages
ah sorry, I use the native stuff, put cursor over the var and
:lua vim.lsp.buf.rename()
I have this mapped in a keymap
tends to work quite ok
Trying it
For some reason when I run :lua vim.lsp.buf.rename()
nothing happens
I have a Gif of this working here: https://github.com/rafaeldelboni/nvim-fennel-lsp-conjure-as-clojure-ide#lsp---rename
I believed you even before looking at the GIF
hahaha
My question is: how to figure out what's wrong on my machine?
It can be clojure lsp or nvim itself what is the version you running at?
there is :LspInfo
and :heathcheck
can lead you to something
Language client log: /home/viebel/.cache/nvim/lsp.log
Detected filetype: clojure
1 client(s) attached to this buffer:
Client: clojure_lsp (id: 1, pid: 2566383, bufnr: [1])
filetypes: clojure, edn
autostart: true
root directory: /home/viebel/prj/cyco/gearhead
cmd: clojure-lsp
Configured servers list: clojure_lsp
VIM v0.6.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -ffile-prefix-map=/build/neovim-Wlz7NM/neovim-0.6.0~ubuntu1+git202110111201-d288daac2-adeb5640f=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-Wlz7NM/neovim-0.6.0~ubuntu1+git202110111201-d288daac2-adeb5640f/build/config -I/build/neovim-Wlz7NM/neovim-0.6.0~ubuntu1+git202110111201-d288daac2-adeb5640f/src -I/build/neovim-Wlz7NM/neovim-0.6.0~ubuntu1+git202110111201-d288daac2-adeb5640f/.deps/usr/include -I/usr/include -I/build/neovim-Wlz7NM/neovim-0.6.0~ubuntu1+git202110111201-d288daac2-adeb5640f/build/src/nvim/auto -I/build/neovim-Wlz7NM/neovim-0.6.0~ubuntu1+git202110111201-d288daac2-adeb5640f/build/include
Compiled by buildd@lgw01-amd64-032
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Would you like to see a GIF of this not working?😉
What happens when you do the :lua
command?
nothing happens
it at least prompts you to rename?
looks like vim
what do u mean?
it doesn't offer to you a prompt to rename
it doesn't offer anything
Can you think of another lsp command that asks for an input?
I'd like to try it
I use those
None of them seem to receive an input beside rename
but they work ok?
sorry I didn't read the part of the input
Yes. All lsp commands work on my machine, beside rename
woah strange
maybe something changed in v0.6.0, I'm on 0.5.1
Are you courageous enough to upgrade?
Hahaha, I can try at the weekend. https://neovim.io/doc/user/lsp.html > rename({new_name}) vim.lsp.buf.rename() > Renames all references to the symbol under the cursor. > > Parameters: > {new_name} (string) If not provided, the user will be > prompted for a new name using |input()|. Maybe your problem is in the input() https://neovim.io/doc/user/eval.html#input()
add_workspace_folder
and remove_workspace_folder
use it
Both work
It drives me crazy!
Even when I am passing an argument to the function it doesn't work
:lua vim.lsp.buf.rename("foo")
So it's not a problem with the input
It's also not a problem with clojure-lsp as the rename works fine with coc
What could it be?
Is there a way to debug it?
maybe a config/pluging you have that is overriding the default behavior
I would start fresh config and enable plugins one by one
I tried
I removed all the plugins beside lspconfig
Same same
maybe, downgrade to 0.5.1?
i couldnt find nvim 0.5.1 for ubuntu