_barjo

u/_barjo


r/neovim•

Does anyone know why requiring nvim-lspconfig files is so slow on WSL?

Running `:Lazy profile` shows that nvim-lspconfig at startup is significantly slower than regular Windows. It takes over 5x the time to load.

Left: WSL, Right: Windows

https://preview.redd.it/fdg9w1tmo7jc1.png?width=1919&format=png&auto=webp&s=962c150cb945753cca5257ceb9646561c9f15706

The rest of the startup is way faster on WSL. Up until this point, WSL was far ahead of Windows, on track to finish in a fraction of time. But due to this slowdown, it ends up opening over 4x slower.

What's the deal? I know WSL is slow while reading files from the Windows filesystem, but all the lspconfig files are on the WSL filesyste

12

r/golang•

This is a question related to programming in general, rather than specifically Go, but I'd like to hear the Go developers' opinions on this from the perspective of this language.

Is it bad practice to use self-invoking anonymous functions, or closures, particularly when initialising variables? This is a pattern I use to initialise a variable at declaration, to avoid having to initialise it later on. Consider the following:

var foo int
if (true) {
    foo = 100
}

Versus:

foo := (func() int {
    if (true) {
        return 100
    }
    return 0
})()

In this simple example, I would not use a self-invoking function, it just illustrates what I'm t

418


r/neovim•

Hi, a lot of terminals allow for a "block outlined" cursor, it's referred to as a different things by different terminals, Windows Terminal refers to it as "empty box". It looks like this:

https://preview.redd.it/me5dhyh9x24c1.png?width=354&format=png&auto=webp&s=a84c1fa08d84cb53697494be7ce2330a27cad4ed

I'm able to achieve this by setting the terminal's cursor to the block outline cursor, but then I lose the behaviour where the cursor changes depending on Insert/Normal mode. I am wondering if there is an option in Neovim to set the cursor to "block outlined". I have looked through `help guicursor` for various permutations of "block outlined" and "empty box" but can't seem to find any opt

11

r/vim•

Say you're typing this: "function(foo)". Pretty common set of characters to write, the way in which "function" is written is ubiquitous, but how people approach the typing of "(foo)" can differ in a few ways.

Option 1: (foo)

Option 2: ()<Esc>hifoo<Esc>la

Option 3: ()<Left>foo<Right><Right>

Option 4: ( <using a plugin which auto-inputs the closing bracket and places cursor between them> foo<Esc>la

For me, I'm strongly in the option 2 camp. I use this for all brackets and quotes, and always have done. It's exactly 6 more keystrokes than option 1 (often I'll use "A" instead of "la" when I'm writing the line, which takes it to 5), but there's some advantages of option 1 which is why I use i

136

r/lunarvim•

Hi, just as the title says.

I'm curious if LunarVim will migrate from null-ls in a future release. It's been archived for a while now and I've seen movement from people switching to alternatives for formatting and linting, it seems like only a matter of time before cracks start to show.

On a similar note, how often does LunarVim receive a new fixed-point release? I know that LunarVim pins versions of plugins for stability, but does it have a set schedule for when everything gets updated and retested?

Many thanks

10