vim

For discussion on all things (neo)vim.
2021-05-25T01:10:13.014700Z

Has anyone gotten the clojure-lsp execute_commands to work under neovim's built-in lsp?

2021-05-25T21:20:42.023400Z

For posterity, I did get it working. My issue was that the cursor position tuple returned by vim.api.nvim_win_get_cursor() was different than what the standard vimscript col() and line() functions give.

Aron 2021-05-25T06:41:18.015500Z

I haven't gotten any lsp or even good autocomplete working yet. If I use something once, it works, but only then.

Aron 2021-05-25T06:43:36.017800Z

otoh, I have a more concrete question about using key bindings and movements, sexp or not: Imagine you are in the middle of your code, you write a call to another namespace for a helper function or maybe you use a piece of data and now you have to add a new require. I used to just go up, copy a line, change 2 words, done. Now it seems to be much more complicated, and I wonder how other people do it, what is an easy/fast way?

Aron 2021-05-25T10:11:18.020300Z

Today I noticed that indentation is still broken in one of my files, but it's consistently broken, basically it resets to 0 and starts indenting from the beginning of the line as if we weren't inside deeply nested structure. I have zero idea how to debug this. Otherwise the =- shortcut works fine, produces a nicer output than what I had before.

NoahTheDuke 2021-05-25T10:17:37.021Z

Do you have a code example for that behavior?

Aron 2021-05-25T10:30:51.021200Z

I will have to clear up the code from unrelated stuff that might contain sensitive info for work. Not sure when I will have time, but if it persists, I will definitely do it before I try anything else.

NoahTheDuke 2021-05-25T11:44:08.021900Z

No worries, just hard to envision exactly what’s happening

2021-05-25T11:53:05.022100Z

By default the Clojure formatter in Vim breaks if the form is more than 100 lines. Try let g:clojure_maxlines = 200

2021-05-25T16:50:34.022300Z

or stop writing 101 line monstrosities :D

😂 1
Aron 2021-05-25T17:06:42.022600Z

it's a react app, it's a flat list of a dozen components

Aron 2021-05-25T17:07:18.022800Z

I use lots of whitespace and don't like long lines, could be much shorter otherwise

2021-05-25T18:19:37.023Z

I'm just teasing, I just fixed a 48 line function myself (finding all neighbors for an index when treating a flat array of length n*n as a modulo grid of dimension m)

Aron 2021-05-25T19:58:14.023200Z

sounds like an esoteric problem that requires special library support : )