Fork me on GitHub
#vim
<
2021-10-25
>
Hukka05:10:36

So far everyone for conjure and most for CoC. Just what you ended up with, or something missing in other solutions?

Hukka07:10:17

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

nate18:10:48

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.

rafaeldelboni13:10:06

This is what I use to replace CoC: • https://github.com/neovim/nvim-lspconfighttps://github.com/hrsh7th/nvim-cmp (autocomplete) • https://github.com/nvim-telescope/telescope.nvim (pickers) And conjure for sure :)

Hukka08:10:47

How do those compare to CoC?

Hukka08:10:22

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

nate13:10:13

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.

Yehonathan Sharvit13:10:10

@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?

rafaeldelboni13:10:49

you mean the autocompletion symbols?

rafaeldelboni13:10:09

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.

rafaeldelboni13:10:48

TL;DR both good hahaha

Yehonathan Sharvit13:10:37

@UMMMKKADU I am not talking about autocompletion but renaming like e.g. renaming a function and all its usages

rafaeldelboni13:10:30

ah sorry, I use the native stuff, put cursor over the var and :lua vim.lsp.buf.rename()

rafaeldelboni13:10:47

I have this mapped in a keymap

rafaeldelboni13:10:10

tends to work quite ok

Yehonathan Sharvit14:10:19

For some reason when I run :lua vim.lsp.buf.rename() nothing happens

Yehonathan Sharvit14:10:56

I believed you even before looking at the GIF

Yehonathan Sharvit14:10:15

My question is: how to figure out what's wrong on my machine?

rafaeldelboni14:10:16

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

Yehonathan Sharvit14:10:51

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

Yehonathan Sharvit14:10:16

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

Yehonathan Sharvit14:10:16

Would you like to see a GIF of this not working?😉

rafaeldelboni14:10:10

What happens when you do the :lua command?

rafaeldelboni14:10:31

it at least prompts you to rename?

rafaeldelboni14:10:35

looks like vim

rafaeldelboni14:10:06

it doesn't offer to you a prompt to rename

Yehonathan Sharvit14:10:14

it doesn't offer anything

Yehonathan Sharvit14:10:13

Can you think of another lsp command that asks for an input?

Yehonathan Sharvit14:10:20

I'd like to try it

Yehonathan Sharvit14:10:22

None of them seem to receive an input beside rename

rafaeldelboni14:10:56

but they work ok?

rafaeldelboni14:10:55

sorry I didn't read the part of the input

Yehonathan Sharvit14:10:56

Yes. All lsp commands work on my machine, beside rename

rafaeldelboni14:10:36

maybe something changed in v0.6.0, I'm on 0.5.1

Yehonathan Sharvit14:10:25

Are you courageous enough to upgrade?

rafaeldelboni14:10:17

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()

rafaeldelboni14:10:00

add_workspace_folder and remove_workspace_folder use it

Yehonathan Sharvit14:10:51

It drives me crazy!

Yehonathan Sharvit14:10:47

Even when I am passing an argument to the function it doesn't work

:lua vim.lsp.buf.rename("foo")

Yehonathan Sharvit14:10:57

So it's not a problem with the input

Yehonathan Sharvit14:10:15

It's also not a problem with clojure-lsp as the rename works fine with coc

Yehonathan Sharvit14:10:53

Is there a way to debug it?

rafaeldelboni14:10:09

maybe a config/pluging you have that is overriding the default behavior

rafaeldelboni14:10:29

I would start fresh config and enable plugins one by one

Yehonathan Sharvit15:10:09

I removed all the plugins beside lspconfig

rafaeldelboni15:10:19

maybe, downgrade to 0.5.1?

Yehonathan Sharvit04:10:48

i couldnt find nvim 0.5.1 for ubuntu