Live data from Hacker News

Neovim v0.4.0

github.com

111–120 of 168 posts

Re: Neovim v0.4.0

#111
post #52

Earlier quoted context omitted.

Command line vim is one of the most productive editing environments on the planet, why wouldn't we?

I'd say language support is the most important for productivity if we talk about programming. Having the whole API under your fingertips, doing safe refactorings easily, etc. are much more important for productivity than simple editing. If you can refactor a class, move functions, rename variables across the whole project safely (string replace is not enough) with a few clicks then you are much faster than when you h…

>language support is the most important for productivity

That is a great point, and this is precisely the goal of the Language Server Protocol[0] (LSP). I agree that dedicated tools have more sophisticated support but LSP is quickly bridging that gap. With how extensible editors like vim and emacs are coupled with there powerful text manipulation capabilities the development experience offered by them in combination with a good Language Server and Client is not to be underestimated. Although editor ergonomics are very subjective so I know this topic can get very controversial.

[0] https://microsoft.github.io/language-server-protocol/

Re: Neovim v0.4.0

#112
post #47

Earlier quoted context omitted.

I just tried this. I get rendering artifacts when scrolling. BUT! The scroll speed is absolutely wonderful. I've tried all the UIs and always find myself going back to the terminal, but this is something else. Although I have to say fvim looks tempting as well and vimr(I'm not on MacOS anymore). For those people mocking vim users and bragging about their IDE's. With languageserver and the other kind of refactoring da…

> For those people mocking vim users and bragging about their IDE's. Haven't seen this, -it usually goes the other way: You're doing it wrong, you should use vim! (I know enough vim to effectively use it to edit configs etc, but I just prefer my IDEs.)

Use vim plugins for your favorite ide and enjoy both! (or not all, we all have preferences:))

Re: Neovim v0.4.0

#113
post #84

Earlier quoted context omitted.

All completers will be able to utilize floating windows immediately, so it's not a special feature of coc.nvim. Using LSP is also not unique to coc.nvim. Deoplete, for instance, supports both as well. I personally have no interest in using coc since it's a javascript based project.

Yes, I wasn't trying to say it's only possible to use with coc.vim, and neither was I trying to say that LSP is unique to coc.vim. But I would not recommend Deoplete.

Why would you not recommend Deoplete? It works well for me.

Re: Neovim v0.4.0

#114
post #95
post #16

Earlier quoted context omitted.

set clipboard+=unnamedplus imap + vmap y Most probably you want this as well: cmap +

Worth noting that this is Ctrl+Shift+v and Ctrl+Shift+c. The C-v (Ctrl+lowercase v) is important for literal character insertion. (Insert a tab, escape, return, etc.)

[deleted]

Re: Neovim v0.4.0

#115
post #38

On this topic, can anyone share their Python setup for Neovim? I used ALE and Deoplete + a bit of Jedi and got frustrated with it breaking / working much worse than ST3 and just removed all the plugins.

I use LanguageClient-neovim[0] with pyls[1], tests are run using `:make` which populates the quickfix list with errors. I also heavily use the location list which gets populated with errors and warnings etc. automatically by LanguageClient-neovim. All of this is accessible through convenient keybindings. Full python setup here: https://github.com/L0stLink/anvil

Status bar is lightline[2] with a custom theme, which I haven't gotten around to pushing yet. I can share it if you are interested. Other than the colors on the bar everything should work.

[0] https://github.com/autozimu/LanguageClient-neovim

[1] https://github.com/palantir/python-language-server

[2] https://github.com/itchyny/lightline.vim

Re: Neovim v0.4.0

#116

I'll just leave a shameless plug for my neovim GUI project here: https://github.com/vhakulinen/gnvim . It has a WIP PR[1] for implementing multigrid support, which would allow features such as scrollbars. There are many other GUIs too, such as oni/oni2, gonvim, neovim-gtk and neovim-qt. Extensive list can be found here: https://github.com/neovim/neovim/wiki/Related-projects#gui 1: https://github.com/vhakulinen/gnvim/…

I just tried this. I get rendering artifacts when scrolling. BUT! The scroll speed is absolutely wonderful. I've tried all the UIs and always find myself going back to the terminal, but this is something else. Although I have to say fvim looks tempting as well and vimr(I'm not on MacOS anymore). For those people mocking vim users and bragging about their IDE's. With languageserver and the other kind of refactoring da…

I just wish vim+languageserver would catch up to where vim+mlcscope was fifteen years ago. (Specifically, finer-grained distinctions that just references to a symbol, e.g. assignments and calls.)

Re: Neovim v0.4.0

#117

Here's a random question for Vim users who might know Kakoune... What can be done to make Vim behave like Kakoune? Odd question, I know. As a former Vim user, I switched to Kakoune about a year ago and absolutely love it. The multi cursor behavior, and selection before action combined to make a really excellent and visual experience. With that said, after 15 years in the Terminal, I tire of it. I want a GUI. Neovim h…

I don't think the amount of people using any of the various (afaik all rather alpha-stage) GUI frontends is very high at all, at this point. People use nvim in their terminal, and that will likely be the case for a long time.

In any case, there are many multiple cursor plugs for vim, now also supporting operator pending. And :substitute includes built-in real-time preview.

Re: Neovim v0.4.0

#118

Anyone has any idea how to get started with VIM window api? Lets say I want to create a "floating" window on the side and populate it with some text. Where do I start?

> Where do I start?

best place would be the docs :h nvim_open_win()

here is a function that takes a buffer id and creates a floating window based on it anchored to current cursor position:

    let s:buff = 0
    let s:buff_max_heigth = 12
    function! CreateTempBuffer(buffer) abort
        let text = nvim_buf_get_lines(a:buffer, 0, -1, v:true)
        if s:buff == 0
            let s:buff = nvim_create_buf(v:false, v:true)
        endif
        call nvim_buf_set_lines(s:buff, 0, -1, v:true, text)

        let height = len(text)
        if height > s:buff_max_heigth
            let height = s:buff_max_heigth
        endif
        let width = 0
        for index in range(len(text))
            let line = text[index]
            let lwd = strdisplaywidth(line)
            if lwd > width
                let width = lwd
            endif
            let text[index] = line
        endfor
        let width = width + 1
        let opts = {'relative': 'cursor', 'width': width, 'height': height, 'col': 0,
            \ 'row': 0, 'anchor': 'SW', 'style': 'minimal'}
        let win = nvim_open_win(s:buff, v:false, opts)
        return win
    endfunction

Re: Neovim v0.4.0

#119
post #116

Earlier quoted context omitted.

I just tried this. I get rendering artifacts when scrolling. BUT! The scroll speed is absolutely wonderful. I've tried all the UIs and always find myself going back to the terminal, but this is something else. Although I have to say fvim looks tempting as well and vimr(I'm not on MacOS anymore). For those people mocking vim users and bragging about their IDE's. With languageserver and the other kind of refactoring da…

I just wish vim+languageserver would catch up to where vim+mlcscope was fifteen years ago. (Specifically, finer-grained distinctions that just references to a symbol, e.g. assignments and calls.)

Have you tried rtags?

Re: Neovim v0.4.0

#120

Here's a random question for Vim users who might know Kakoune... What can be done to make Vim behave like Kakoune? Odd question, I know. As a former Vim user, I switched to Kakoune about a year ago and absolutely love it. The multi cursor behavior, and selection before action combined to make a really excellent and visual experience. With that said, after 15 years in the Terminal, I tire of it. I want a GUI. Neovim h…

Can you elaborate a bit further on why you prefer Kakoune over Vim ? Thanks.
Post reply on HN