> I'm looking into getting this on gitpod. The goal is that you can run neovim in a container on a web ide and get most of the goodies OOTB, this is the pilot for that.
Hey, Geoff here from Gitpod. We would love to see this happen - come discuss over at www.gitpod.io/chat
Ps. The emacs-lsp maintainers recently did something similar over at https://github.com/emacs-lsp/lsp-mode/issues/2845
One of Neovim's banner features is that it has full terminal emulation baked in. It is invoked with the :te[rminal]
command. It is worth reading the helpdoc on this, as it is pretty versatile. So far as I understand, this should do everything and more that you would do with :shell
in mainline vim.
*edit: I would also add that if you plan to explore (or use) Neovim at any length, it will be worth your time to browse through the :help vim-differences
portion of the helpdocs (also available online here).
From Neovim's official roadmap:
Lua remote plugin host
Lua user-config: init.lua
Treesitter syntax engine
LSP client for code navigation, refactoring
Extended marks (text properties, decorations, virtual text)
Edit: format.
> version 0.2
I don't know why people harp on this. Pre-1.0 has literally nothing to do with "alpha". Literally nothing. It is a signal that we may still make potentially breaking changes. We haven't done that often, but we still need to reserve that option.
Mountains of stable software are still pre-1.0, e.g. https://inkscape.org .
> hasn't completed the list of features that it raised money to build
I don't accept that. We've met all the goals. The "translate VimL to Lua on-the-fly" goal was rejected because the performance isn't there. And in fact, that goal was met "to the letter", it just wasn't merged to master.
> it's cross-platform support is still pretty weak
Windows support still needs work, other than that, I don't know what you mean. But calling it "alpha" is hyperbole.
Welcome. I can almost swear something like this was posted few months ago, but we are glad to see new people interested. In terms of setup, the install process is slightly slower than gVim if you're on Windows (at least several months ago), but everything else is quite easy. Basically you need to move your vimrc to another spot, and install a python module if you use any python plug-ins. Nothing in your vimrc really needs to be changed, so it's quite easy for you to just give it a shot.
In regards to features, although Vim 8 now also has multi-threading, Neovim still has some unique features. A new hot topic is live substitution. Another advantage is that Neovim has a long list of clients for writing plug-ins (including two for using Go), so you don't need to learn vimscript to contribute.
Keep an eye on https://neovim.io/roadmap/ which has links to the milestones. We are focusing on 0.1 and there aren't any major blockers left, just a few bugs.
0.1 will support linux/bsd/osx, but not Windows. In 0.2 we will focus on shipping a GUI and finishing up the Windows support.
I moved to lazygit (and I have mapping to open lazygit in floaterm) and for merge conflicts I usually just use meld, as is little more visual and easy to use.
I tend to do almost everything in neovim, but I leave few things to external applications as I find those much faster to use. Still missing jetbrains merge tool, but meld is "close enough".
Neovim is pretty good, but if you want to try emacs, I would suggest using spacemacs, so you won't have to go through the trouble that is learning and setting up emacs to your taste (initially), and you can customize it as you get more familiar (maybe even ditch spacemacs later down the line).
Strictly speaking, this isn't fully true. Neovim has no idea what is on the other end of the communication, the only real condition is that it speaks msgpack, which most languages do. Python remote plugins don't ceccessarily NEED the neovim module, it's just that they all do, because the programmer chose to use it.
What the module provides is a plugin host, which provides quite a bit of ease for the programmer. And that is what the python neovim module provides. If you write a python plugin, and are willing to deal with all the nitty gritty communication details yourself, you can do it without the host, and the users won't need to install the module then.
You can read more about all that in the documentation.
As an example, I'm writing a rust plugin, and there's no such thing as a rust host. I'm using a helper library, that does all the heavy work, but in the end my plugin is just a binary, nothing else, and of course neovim has no idea what it was written in.
You can use guicursor (:h guicursor
) to change the cursor depending on the mode. The problem is that it doesn't seem possible (based on a few minutes of testing myself) to prevent the block from blinking even when set not to, unless you disable it totally in Kitty (https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.cursor_blink_interval). You can use set guicursor=v:hor50
to at least see the selection.
I believe you don't need to specifically enable the first two in Neovim, since they are enabled by default.
For shortmess
, if you are using the latest Neovim master, you can use vim.opt.shortmess:append("c")
. As far as I know, there wasn't an equivalent to +=
before.
I've typically got about 30 tabs across 10 instances of iTerm2 all pushing 24-bit color codes to a 4k display using anti-aliased 13pt font. Performance was becoming a problem, and the worst part is that it was inconsistent. Sometimes keystrokes would just bog down for no reason. Neovim felt "mushy". I could literally perceive the re-paint algorithms whenever I resized a window, for example.
> I've never noticed lag caused by actually rendering the terminal.
I suggest installing Alacritty for yourself to see what you may be missing. I've spent a day and a half with it now and I don't think I'll be able to go back to iTerm2. Currently forging the arcane config to match my previous workflow.
It's weird for me because I remember printing to a text mode CRT on my old 386 and feeling a much more direct connection with the machine. Terminal emulators now are wrapped in so many layers of abstraction that something gets lost.
Here is a good article: https://www.freecodecamp.org/news/a-guide-to-modern-web-development-with-neo-vim-333f7efbf8e2/
It's mentioned in this issue https://github.com/junegunn/fzf/issues/809. The workaround is to disable the height option in the neovim terminal, by adding this into your init.vim:
let $FZF_DEFAULT_OPTS .= ' --no-height'
I'll try them all, especially if anything close to the quality of CHADTree :) just installed CHADTree and can toggle between NERDTree to compare. Initial impression is that I'm impressed it does feel more responsive than NERDTree. I like the look of the features / keybinds - file management has similar ideas to https://github.com/jarun/nnn which I also like. Definitely a nudge up from NERDTree. Need to learn the new keybinds since my fingers are bit NERDTree trained ;) Need to fix the theming a little since doesn't feel tuned for dark background, but enough docs / configuration options for me to work that out.
You should give alacritty a try. It's also gpu-based and very similar to kitty (mentioned in this thread) in terms of features, but it's written in Rust.
I'm a big fan of rust-based tooling since the code winds up being just as fast as C, but without the memory safety issues that cause bugs and system vulnerabilities.
:help nvim-features is a more up-to-date and complete reference, that Progress page will be removed soon. The "single source of truth" is intended to be :help nvim-features.
I switched from iTerm2 to Terminal (big difference in NeoVim speed) some time ago and then started using tmux instead of tabs. And then I found out Alacritty has matured quite a bit and switched to it (which was a breeze thanks to tmux) https://github.com/jwilm/alacritty -- the speed is insane.
So in addition to fiddling with resource-heavy nvim plugins I also suggest you try other terminal apps. iTerm is a resource hog.
Glad to hear the pre-built package was useful.
> maybe stuff like this needs to be emphasized as well,
It was mentioned in the newsletter, on twitter, in the help docs, and in the FAQ. What do you suggest to make things more clear (genuine question)?
You can still use typescript language server for plain js project. Instead of adding tsconfig.json you can add jsconfig.json and continue writing plain js. To avoid errors you can loosen the compilerOptions flags since you seem not being bothered with the type checking from typescript. You can also leverage the include/exclude fields in the config which would basically ignore some parts of the project so you wouldn’t get errors from there.
Typescript's lsp can work with jsdoc so if you still decided to annotate your code you don’t necessary have to rewrite it in typescript
For more info on jsconfig.json see the docs https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
I'm not "trying" to like it, I just didn't get into it.
https://obsidian.md/images/screenshot.png
That just looks like a big-o-fluster-cluck.
I write in markdown, a LOT. Several github repos and easily 100 md files. I just like the idea of having them all in one place easily accessible. I thought Obsidian was "the way", but after messing with it for a couple of days - nope.
However with fzf
and some simple flags, I have instant access to them. So not really an issue.
If you're still using CtrlP for fuzzy finding then I recommend checking out FZF (https://github.com/junegunn/fzf). It's way faster. It acts as a basic neovim plugin out of the box but the developer has also put together a plugin with more advanced stuff like buffer searching.
st. A little more complicated to configure (config fixed at compile time), and deliberately feature light, but performs well.
Any "missing" features are well filled with tmux or screen, playing nicely into the suckless philosophy of not reinventing the wheel.
Windows folks already using Chocolatey can install nvim and nvim-qt with one command:
choco install neovim -y
If you feel like trying your regex skills with live feedback, you can also use inccommand
'inccommand' 'icm' 'inccommand' 'icm' string (default "") global
"nosplit": Shows the effects of a command incrementally, as you type. "split" : Also shows partial off-screen results in a preview window.
Works for |:substitute|, |:smagic|, |:snomagic|. |hl-Substitute|
If the preview is too slow (exceeds 'redrawtime') then 'inccommand' is automatically disabled until |Command-line-mode| is done.
I like the split preview, but in this case it's probably not the best of helps.
> Regarding WFH, Neovim might be some of the core developers main income? > https://neovim.io/sponsors/
No. That is used to fund selected developers whenever someone has 1+ months to work full-time on the project. It funded the LSP work in winter 2019, and now there's enough in the fund for another project.
FWIW, until now 7 different developers have been funded. $2500/month (before taxes) is not enough to fund anyone permanently, though we recognize and appreciate that this is still far more than many OSS projects receive, and are grateful for this level of support.
Some notable outcomes of funded work include:
:terminal
VimR (https://github.com/qvacua/vimr) is more of a wrapper than an integration, but I'm not sure I understand your exact question, so maybe that's what you're looking for? In my experience, VimR works well. It renders as fast or faster than any terminal I've used and via the built-in Neovim terminal, can be a pretty good stand-in for a terminal-ish experience. It has had intermittent stability issues for me. That said, it's being actively developed and I haven't used it very recently - perhaps it's more stable now.
The Neovim roadmap lists "Embed Neovim everywhere" under "Future/Long-term" so I wouldn't expect the developers to be focused on enabling full integration any time soon.
if youre referring to the fact that different distro's change vim feature at compile time, leading to different feature sets (and sometimes multiple packages like vim
andvim-huge
), then no. website source.
If you look a little to the right on the shop page, you see: The Neovim logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License. That is confirmed by the neovim.org page.
You can get the logo here: https://neovim.io/logos/neovim-logos.zip
You might be able to use the Atom UI; see here for some more information.
Still, Neovim's master branch does not build on Windows at the moment (but this is being worked on). Once it does, I'm sure it'll be announced here ;-)
Some Github issues to follow: https://github.com/neovim/neovim/wiki/FAQ#when-will-windows-be-supported
I found this thread in the google group which pointed me here:
https://ci.appveyor.com/project/equalsraf/neovim
Which contains a link to a binary but according to the thread doesn't come with a UI, so isn't all that useful
It compiles, but the terminal UI doesn't work (you would need to use the Atom client or some other GUI). Windows-specific changes have not been merged back into master yet.
Also see https://groups.google.com/forum/#!topic/neovim/s-Y_9XV1sQw.
You probably want to use git merge
when adding the commits (I’m not sure how you merged them in your case).
Otherwise, the author flag here should help: https://git-scm.com/docs/git-commit. This mostly makes sense for commits copied verbatim manually.
Finally, a “Co-Authored-By: xxx” generally is okay. Especially if you’ve substantially edited the commit from its original form.
https://git-scm.com/book/en/v2/Git-Tools-Submodules
I personnaly think it's still not as simple and elegant as a plugin manager, but that solves one of your issues at least. It is possible to update everything even without a plugin manager (if your configs are versioned with git of course).
For people using just a few plugins, I see this as a perfectly viable option. But for dumb people like me with over 80 plugins, it's starting to get less interesting.
Yeah, as far as I know you can't have the animated asciinema on GitHub. FYI you could try to host your own site for free with something like GitHub Pages. You would then have a website like ibhagwan.github.io and you could put what you want there.
I agree. While I mostly use Emacs (don't hurt me), I used Doom Emacs for awhile and used it to configure my own Emacs config. Both Emacs and Neovim can be a bit daunting to configure at first (Emacs more so since of how much it does and gives you out of the box that isn't configured or immediately/obviously expressed as available).
I'm using LunarVim to write my own Neovim config. Nothing wrong with that, nor just sticking with what's given with LunarVim.
Not everyone wants to put in the effort in building out some amazing config.
old.reddit
does not support triple backtick notation. Neither do most third party reddit apps.
The official markdown specification supports only the indent method for declaring code blocks. Triple backticks are an extension made popular by github, but are not part of the spec. I'm not sure by what metric you'd call them "preferred".
ah man, This looks extremely promising. Thanks for this! Unfortunately, Debian's R version is too old (v3.3.3) for this to work. I may look into installing R through Nix or similar means, though.
Tried many (if not all) of the available ones on osx. So far vimr
is the best one for rendering speed, but I've been using it only for a couple days so I can't say anything about stability or hiccups. The electron based nyaovim
has some potential but in my experience it tends to be very slow in some edge situations (e.g., opening a big rails schema.rb
file with a lot of ale
linter errors). Same goes for nvim-qt
. Even the terminal based combo with alacritty, tmux and neovim isn't as fast as vimr when scrolling the above file. So yes, vimr is really good.
It looks like the error is coming from tmux's load-buffer -
or save-buffer -
commands, via the neovim clipboard provider. See https://github.com/neovim/neovim/blob/44c6deb91ac917703c157d564eb3accbff4d37af/runtime/autoload/provider/clipboard.vim#L104 and https://github.com/tmux/tmux/blob/ead6d652ffbf9870e6aaf5c40d3a8ceab7bb87eb/cmd-save-buffer.c#L72
It looks like tmux save-buffer -
produces the "no buffers" error if tmux load-buffer -
hasn't been executed at least once to create an initial buffer.
I recorded myself making the edit here.
My Vim-speed is not the fastest in the world, but I like this approach better than regex search and replace because it's more interactive, and I can see what I'm doing as it happens. Now, here's an outline of what I did (these are not exact keypresses) and some critique for how I could have done it better:
vi{V
here. Not sure why I wanted to repeatedly press j
...S}
return new Address
- you get to see my slow typing speed hereqa
), then the edit which is df>.df.."nyiwf(vabc = _faker.<C-r>(),j^q
@a
There are undoubtedly more efficient/better ways to do this, but this is how I would "Vim this".
EDIT : Example usage here
Actually, I added some features the author talked about in his talk, like incrementally growing selection. There is also not-that-bad-but-can-be-better completion system, that only suggests items that actually are visible in this scope. I'm dreaming (and working on) an even better suggestion filtering based on types (for languages where it is actually possible), but it is not yet implemented.
Treesitter integration (in the way this plugin uses it) is pretty mature, I did not encountered any bugs actually.
In the README you'll have some examples of things you can do with the plugin, and feel free to ask any further question on the gitter ;-)
Last but not least : completion-nvim is crazy good, it is fast, lightweight, and the development goes fast.
So I've found a solution to my problems thanks to /u/sylvain_soliman.
nvr --remote-tab-wait-silent +'-tabmove' +'set bufhidden=delete'
autocmd BufReadPost,BufNewFile .git/**/* set bufhidden=delete
autocmd BufReadPost,BufNewFile .git/* set bufhidden=delete
autocmd TermOpen * set bufhidden=delete
This makes git call nvr which opens a new tab in neovim instead of nesting neovim in neovim. The autocmd's makes shure the git buffers are deleted when closed which in turn lets neovim-remote know that it should continue.
I illustrate a rebase here: https://asciinema.org/a/JMo3jPYj9Ou3M5x0CquzU9izc
Well, I don't use symlinks. I use the home directory as a git repository. So, whenever I set up a new computer, I do this:
cd ~ git init . git remote add -t * -f origin https://github.com/vatrat/dotfiles git checkout master
Then, I can just use my home folder as a repository. Now, going this route, you have to have a .gitignore. This is the file that tells git which files to ignore. I use it as a whitelist, telling git to ignore all files except the ones I add specifically.
File:
* **/.swp
!/.gitignore !/.gitconfig
!/.config !/.config/nvim
There are probably some mistakes or things I could improve with this file. I don't really know the ins and outs of working with .gitignore files.
So, now my dotfiles, such as my init.vim, are tracked by git and live alongside my regular files. I like this, but everyone is entitled to an opinion. (Unless, of course, I am missing some flaw of my setup).
Edit: Unrelated, but you may find this useful for working in the shell. http://explainshell.com/
I use ack.vim configured to work with ag. Ag is a fast source code searcher I use inside and outside of vim, while ack.vim is just a small wrapper around vim's built-in :grep command, which adds some conveniences like automatically opening the quickfix list.
To configure I have this line in my init.vim: let g:ackprg = 'ag --nogroup --nocolor --column --hidden --path-to-ignore ~/.config/ag/.ignore'
deoplete_clang and clang_complete are different tools that do the same job, they feed deoplete with C/C++ sources.
To configure deoplete_clang for QT you need a .clang file on the root of your project that looks like this:
[ { "directory": "/home/user/llvm/build", "command": "/usr/bin/clang++ -Irelative -DSOMEDEF=\"With spaces, quotes and \-es.\" -c -o file.o file.cc", "file": "file.cc" }, ... ]
You have to customize it with your QT include path, and your build file, etc...
Take a look at the documentation for how to configure it.
deoplete_clang also supports single line flags, like they show here
Each completer plugin will require you to write a similar configuration so that deoplete (or whatever auto completer you want to use) can find the source files that live outside your project folders.
If you're willing to use an Electron-based application, there is a Neovim GUI for Windows called Oni that works fairly well. Otherwise, I recommend the classic and dependable Cygwin for all of your Linux-on-Windows needs.
Thanks to the reply!
The part i am actually having trouble with is building more usable abstractions on top of the coroutine primitives, I feel like I have a good understanding of how coroutines work, in a non-asynchronous context, and I have a good understanding of how the coroutine based abstractions work, such as those that are used in Python.
The issue I have is that I don't have a good idea on how to get from the lower level stuff to latter, the Lua book has an example, but it basically pauses the lua script instead of yielding control when you try to get results from many async coroutines.
> allowing you to mix old viml functions with new ones
Well I'm sure that has no maintenance headaches or negative impacts on Vim9's spec...
> Fortunately, neovim can also run old viml functions
Yeah, it was more around whether the JIT would make all viml faster, than compat. It would be pretty funny if nvim was just "viml but 10x faster".
e: interestingly, nvim wrote a viml parser that returns a proper AST https://neovim.io/doc/user/api.html#nvim_parse_expression()
VimL will forever be supported, at least according to the about page:
Goal: Develop first-class Lua/LuaJIT scripting alternative to VimL.
Non-goal: Deprecate VimL
Huh, seems this test uses cwh instead of pvh. I wonder why that is, I kinda remember that differently. Also, I'm wondering where that is documented. The inccomand option mentions a preview window, which kinda implies pvh for me. Might be worth raising an issue, or asking on gitter or something.
Yes and no. Yes, because all vim plugins (not using vim9 second generation VimL langauge; I am not sure how really popular that is) are also neovim plugins. No, because the support of Lua in vim is not 100% same as the one in Neovim, so Lua plugins written for Neovim most likely (not necessarily) won’t work.
I haven’t used Vim for a while, switched to NeoVim not long after it was released.
The overarching differences are it’s community built and progressive while retaining all that Vim goodness.
Initial killer features for me were things like async, language providers, and massive potential for extensibility. Personally prefer tmux to the built in terminal.
Today, Lua’s being adopted, LSP built-in or VSC via coc.nvim (atm you’ll probably prefer the latter for those languages), treesitter has a lot of potential, etc.
If you really want to get into it, checkout the releases page and roadmap.
I was asking a legitimate question. Sure COVID-19 might be the reason, hence my question.
There are also other core developers that have contributed much less the last year+. u/mhinz. u/ZyX-I (hope he is OK?)
Regarding WFH, Neovim might be some of the core developers main income? https://neovim.io/sponsors/
FAQ
How can I sponsor Neovim?
Neovim operates a Bountysource campaign to fund ongoing development. This makes it possible for core developers to work full-time for a month or longer, accelerating projects like Lua integration, the VimL engine, extended marks, embedded terminal, job control, and the RPC API.
Asking on reddit is a good first step, especially for usage questions like this one. If it's a real issue, vim/neovim have issue trackers that you should put an issue on, but investigating first is always a good thing. If you want different channels to ask at, have a look at https://neovim.io/community/.
I can't help you with that, just tell you the following: At least justinmk reads this subreddit, he might be able to help. Otherwise, joining the neovim gitter (see https://neovim.io/community/) would likely be a good idea, most of the competent people are there.
There's built in stuff, but it can be a bit overwhelming if you are new to Vim. Really good once you learn it though, and you get some extra skills in neo(vim) as a bonus.
https://git-scm.com/docs/vimdiff
Most of it is shared with Vim, note the bits about gvimdiff (for GUI) and nvimdiff (for neovim).
Your plan sounds great so far. I am in a similar boat.
I would like to take notes as regular files so that I can use neovim as the editor. Being required to use other front-ends (web apps, desktop apps, etc.) is a non-starter.
I haven't settled on the format yet, but markdown, neorg, or mind all seem like great options. Using a standard format like markdown allows you to use alternative front-ends for special scenarios. For example, you could use obsidian to visualize your notes as a graph.
On mobile, markor looks great for markdown, but not sure how well it supports neorg and mind. Sure, the files will probably be usable since they are just plain text, but will they be rendered with syntax highlighting? Will there be auto-indenting? I wonder if there are other mobile apps with dedicated support for those formats.
As far as syncing across devices, I see little point in using the expensive Joplin or Standard Notes. Here are two other options: 1. Google Drive (or similar) for syncing across devices and cloud backup 2. Syncthing for syncing across devices and something like rclone, restic, or borg for local and cloud backup.
Personally, I am moving towards number 2 as I am de-Googling as much as possible. I have a Raspberry Pi at home that will act as my central node for Syncthing, which will sync my files across my desktop computer and Android phone.
Same here, only time I see subreddit icon is while I browse reddit with my phone (using sync for reddit pro) AND if I click "about" button.
Tho new dev version of sync has those icons on feed, so I might see those more in the future :P
the trouble with pixel padding in a terminal is that you can only adjust the width and the height or things in nvim by rows and columns. which is the dimensions of a single character. otherwise text would be cut off. if your window manager spacing results in an uneven calculation, you are going to get extra padding on some sides. that said, if you have tweaked the WM spacing perfectly and just want different padding sizes for standard terminal/nvim look to see if alacritty has any way to remotely change setting. Kitty, for example does. I had aliased nvim to a command that sent a remote call to kitty to update padding and then launched nvim. by the time i got to figuring out how to undo that on exit, i decided i liked the padding and adjusted my nvim theme to look nice with it.
for reference: https://sw.kovidgoyal.net/kitty/remote-control/#kitty-set-spacing
Interesting question. I mix a lot. I use bspwm to create a window with a terminal for each individual project or general task. In kitty I group related functionality by tab and use layouts to position different applications that I want grouped (often development servers or server consoles). When working inside nvim I often use the built-in terminal for tasks related to the "code" (poke around, move stuff, create files, more advanced git commands etc).
Example workflow:
htop
.zk
where I keep my notes.its not being consistently 20ms faster/slower, but it adds like half-a-second lags here and there.. its not about "being slow" anymore, i'd say its a bug...
its like having a slow, but consistent internet connection v.s. an unstable internet connection that spikes and drops randomly. The former is mildly inconvenient, but you can learn to live with it, the latter will drive you mad..
when you're using vim, chances are you like the snappiness of it, but using vim inside tmux on macos, thats completely negated. even just scrolling around files feels miserable, things like auto-completion/fuzzy finders is pretty much unusable...
>Should I use the newer version?
Yes, you need the newer version (6.1).
>If so should I compile from source or should I use the appimage?
I recommend to use brew. The installation is simple and easy, but if you don't want to use, AppImage is better than compile neovim.
>Should I start with lua or should I write my first config in vimscript?
In my case, I suggest to use Lua (more faster and compatible with vimscript), but you need to test yourself which init file can be better.
Oh that is super cool! You can drag and drop images onto github directly
​
I use imgbb.com to host my gifs works fine. But the drag and drop method is even cooler. Thanks for the tip.
> I'm not sure for the config table since I don't understand how it can be done, but I will do some research
You have two tables: settings
which remains as it is and will never be written to, and config
which is empty and will be exported. Users can write their own settings to config
and you read settings exclusively from it. Here is where the magic happens: you set up the metatable of config
such that if the code tries to look up a key that does not exist in config
, it looks up the key in settings
instead.
That way users can shadow the default configuration without altering the defaults. Users can delete their individual settings (setting the entry in config
to nil
) and this will restore the default behaviour. The important thing is to never write to settings
, the defaults are immutable.
Pulling this off requires knowledge of metatables. The Lua book covers the topic in its own chapter. Metatable are an advanced topic and allow you to pull off all sorts of crazy things.
You shouldn't really need a specialised/dedicated WM I don't think. Neovim's API offers sophisticated controls for GUI clients (for example) to create/manipulate native windows.
I think the main thing now is probably waiting for one of the nvim GUIs to develop the appropriate features. Goneovim looks like it's getting there and may already be good enough for your needs. E.g. you can break any nvim window (floats, splits etc) into a separate external desktop window.
I believe you missed this part of the coc-tsserver doc that says "Note for javascript project, make sure you have jsconfig.json" (I had the same issue)
I think even something as simple as this in the root of your project will make it work:
{ "compilerOptions": {}, "exclude": [""]}
Oh, sorry, I've been talking about the diagnostics not showing up at all in some cases when I open a file and edit it. :) Some edits like typing incorrect methods shows the diagnostics correctly, yet something like "a = b" breaks it for some reason until I delete a line and undo it. Yet "a = b" also works correctly if I've saved it and reopen vim.
Take a look please: https://asciinema.org/a/B4KBCQxeUc5DYd0g8unfwjAXo
Thank you!
Yeah I thought about video too, like asciinema. But I'd like to think just the natural reddit system of voting would eventually cultivate an accepted style of submissions. Like maybe after a while it's clear that the highest voted submissions are all asciinema. Or something completely different!
Yeah that was my idea... do you have that problem in vim as well? You might want to check https://stackoverflow.com/questions/12915797/gvim-remove-syntax-highlighting-groups to see if that contains something helpful.
Hmm, this sounds exactly like your problem, but I can't seem to find it on homebrew's issue tracker.
It's not really nice, but just reinstalling Python 3 using homebrew might be the easiest solution.
https://www.linode.com/docs/guides/how-to-install-neovim-and-plugins-with-vim-plug/
You can see from here. But recently i have started putting that plug.vim ( that's rhe only file you need apparently for vimplug, jus look for it in the repo it's only one) in my autoload directory (~/.config/nvim/autoload) and vim loads that before any other user files ... I think
Hey, how do I actually install it with go?? I've been battling with it for a day now ,tried all the ways and the go installation doesn't work for me. I followed this to install go and then did go install github.com/mattn/efm-langserver
. No luck
Again, if you have windows 10 you don't need a dual boot, you can just use the WSL thing. Which is even better, because both Linux and Windows access the same file system.
Depending on what you'll be developing, I would say that there is no need for a dual boot, just use Windows. If you ever need something that is Linux only, use VirtualBox or another virtual environment solution.
I write my docs/blog with nvim and markdown. For more advanced checks, I use vim-grammarous for (offline) integration of languagetool
Most minimal and preferred solution is to make functions and classes fit on one screen in the editor. I usually find if they are over about 50 lines then they need refactoring.
https://eslint.org/docs/rules/max-lines-per-function
If you don't believe me, listen to Martin Fowler:
"Any function more than half-a-dozen lines of code starts to smell to me"
I write short stories, blog posts and do commercial technical writing in Neovim and it is the best! It is the fastest and best way to write, I use Markdown and then can export to anything with Pandoc.
Very recently (0.6.0 I think) you can use the built in 'Thesaurus function'! You extract the magic function from the Neovim help files and put it in your init.vim
: https://neovim.io/doc/user/insert.html#compl-thesaurusfunc
```
func Thesaur(findstart, base)
if a:findstart
let line = getline('.')
let start = col('.') - 1
while start > 0 && line[start - 1] =~ '\a'
let start -= 1
endwhile
return start
else
let res = []
let h = ''
for l in split(system('aiksaurus '.shellescape(a:base)), '\n')
if l[:3] == '=== '
let h = substitute(l[4:], ' =*$', '', '')
elseif l[0] =~ '\a'
call extend(res, map(split(l, ', '), {_, val -> {'word': val, 'menu': '('.h.')'}}))
endif
endfor
return res
endif
endfunc
set thesaurusfunc=Thesaur
``
And you need to install the tiny dependency
aiksaurus`. On Centos/Rocky/RHEL 8 it wasn't available, but aiksaurus-1.2.1-38.fc28.x86_64.rpm from an old Fedora works perfectly.
Now just to the end of a word and ctrl x t and you get an awesome Thesaurus!
The bot linking to the wrong page. The correct page should be at https://neovim.io/doc/user/vimindex.html
This bug has already been reported at https://github.com/heraldofsolace/VimHelpBot/issues/40
No one has commented this yet, there is now a preferred way of install treesitter plugins: https://nixos.org/manual/nixpkgs/unstable/#vim (see the Tree Sitter section).
My term is working with xterm-256color
already, so I'm not sure if I understand your suggestion. Here's the output of infocmp. I never used this program before, I just ran infocmp
on Xfce-terminal.
> let g:LanguageClient_loggingLevel = 'DEBUG' > let g:LanguageClient_loggingFile = './LanguageClient.log' > " LanguageServer is less chattier than LanguageClient log fyi > let g:LanguageServer_loggingFile = './LanguageServer.log'
Yeah, there seems to be some sort of error. I renamed the settings.json (not that it should matter) and am getting the same message. https://ghostbin.com/paste/r8t2z
I probably didn’t explain it really well. It seems like there’s a box I have to scroll in.
The whole area under the navbar is scrollable is what I’m thinking.
Kinda like this https://getbootstrap.com/docs/4.0/examples/navbar-top-fixed/
Caleb Taylor's configuration is pretty sweet and uses Denite fairly extensively. https://github.com/ctaylo21/jarvis/blob/master/config/nvim/init.vim
There's some other pretty good stuff throughout his dotfiles. He wrote a nice blog post about putting it together. https://www.freecodecamp.org/news/a-guide-to-modern-web-development-with-neo-vim-333f7efbf8e2/
> Web dev, written a few web dev books with it
VERY cool 👍
Found your book on Amazon 😀 (link for those interested)
yes.
Everything that happens in the terminal becomes text in a buffer so that you can navigate it, search it, yank it, past to the terminal (append only).
I often do something like edit a python file and then :terminal<CR>apython <ESC>"#pa
so i write python and then paste the path to the file I just edited.
When editing for example postfix config, you can open a terminal, curl http://www.postfix.org/postconf.5.html
or some tutorial or similar, go back to your postfix config and have every option in your <C-N>
completion.
I used to do :r ! some command
but got anoyed when i did it wrong. Now i do the same command in terminal, and yank the relevant lines
I used to use nerdtree that I felt slow to manoeuvre with. Then I discovered fzf, felt amazing. I could reach everything with minimal effort, config and it served me perfectly. That is why I integrated it into my workflow. Since then I tried telescope.nvim cuz of the hype. Works almost the same as fzf but with some extra nice to have stuff.
fzf uses floating/popup window when available. To force it to use the old layout (split window), put this in your config file.
let g:fzf_layout = { 'down': '~40%' }
Basically, to enable syntax highlight in ‘preview-window’ you need one more package. The developer suggest ‘bat’ (or ‘batcat’, depends on your distro).
You can try first. If you can’t figure out, let me know I’ll come back with more details (I’m not with my laptop right now.)
My ~/.config/nvim/init.vim
is just this:
vim
set runtimepath^=~/.vim,~/.vim/after
set packpath^=~/.vim
source ~/.vim/vimrc
and I can have happily vim/neovim compatible configuration (yes, there are some errors on start of the original vim, because of configuration for things vim doesn't have like the native LSP client, but it works). Moving configuration to ~/.config
subdirectory is actually The Good Thing™, because it is now the standard, where the idea is not to have so cluttered ~/
directory.
This is Mac specific (and I am on Linux). Using which looks a variable %User
on your command line seems to me suspicious, but I have really not much to add.
Some GUI can have some menus for it, I use [fzf](https://github.com/junegunn/fzf)
and fzf.vim
(mainly for other things, I don’t select colors all the time), so I have command :Colors
, where I can select from all available colorschemes easily.
Also, read :he 'termguicolors'
and most likely you want to have it on.
nvim
command is just a terminal client for the neovim in background (and no, that background cannot be separated easily into an independent server; I don’t think we have an equivalent to emacsclient
).Thing is, `:Buffers` loads faster.
A lot of times, you'll have the file you need already in a buffer, and opening `:Files` is a lot more io-heavy, it has to actually query the filesystem for filenames, so in a big project there's more of a lag to it. It's probably not as much of an issue if you have an SSD but being on HDD I do notice the difference.
So the idea is not really moot
For what it's worth here's an issue where someone's tried to implement this, but I haven't really tried to give this a go yet.
I mean, if you source fzf bash or zsh files you should have **
automatically expand to fzf search then you can mark multiple files to pass to (n)vim. It’s just less typing than piping with xargs...
Edit
I'm looking for something more interactive, with more immediate feedback than that, like in this gif: https://raw.githubusercontent.com/sodiumjoe/lobar/master/lobar.gif
Or if you think of the workflow of something like fzf, opening a full instance vim wouldn't really be useful.
Rather than document the subtle quirks that I experienced, I'm ok with you thinking that I'm spreading FUD about eshell until you experience the quirks yourself.
Try running vim or fzf in eshell or ansi-term.
I had trouble with GitHub sponsors accepting payments via my card, so I contributed 25$ via neovim opencollective. It deducts a part of the amount but didn't have another option. May be next year I will try GitHub sponsors again. It is an amazing project and definitely needs all our support.
Neovim's split windows share registers, respond to windo
, and it is easy to record macros that move from one split to another, etc. Tmux can do none of this.
I actually don't use tmux at all because the neovim built in terminal covers 99% of what tmux can do. The missing 1% is session management. The server that I regularly ssh into has screen installed, so I just use that. It feels like bloat, honestly, because I use only the session management and nothing else. If I wanted this on my local machine I would use something lighter, like dtach
I must say, I don't really care about NeoFS, dirvish does enough for me...
But Nog, I'm very much really caring about. Whats the (very brief) sales pitch of why you didn't just use something likebug.n or workspacer? Just wanted to make one? How stable do you feel it is?
To sell myself on it, bug.n being a collection of autohotkey scripts makes me feel slightly queezy, and Workspacer while quick, having it's configuration in C# and basically no documentation beyond finding other peoples setups in it's issue tracker is a bit of a frustration.
Nog looks really good with a pretty comprehensive docset and config via rhai is neat.
Nog
I am not familiar with vifm
as nnn
is my daily driver. I have heard good things about vifm
too. You can take a look at the nnn
features here: https://github.com/jarun/nnn#features and have an idea of the similarities and differences between the 2 file managers.
So, I tried to install the zsh-athame-git from AUR but package is out of date. Anyway, I've stolen the vi-mode from Oh-My-Zsh, where if you press v
in normal mode it makes you edit the command directly in vim/nvim (depending on your $EDITOR
). That's more than enough for me :)
This happens to me all the time, but I don't think it is neovim related.
If you have an unstable internet connection then ssh is prone to do this. Even brief interruptions of connectivity will break the connection. When the connection is broken like this ssh does not even generate warnings or error messages or anything, and there is no good way to even know for sure that this has happened. Ssh also does not allow you to roam from one connection to another, and if you do, you will experience this exact kind of breakage immediately (again, no error messages or anything).
There is an alternative to ssh called mosh, which is supposed to fix these issues.