Weekly Shaarli
Week 08 (February 17, 2020)
Making vim-loop more like jobstart to enable easy asynchronous lua programming in nvim
A todo "plugin" for Vim, inspired by workflowy -- uses its own filetype; but maybe can be adapted to work in other filetypes
Using lua for configuring nvim instead of vimscript
Eier kochen und die richtige Kochzeit finden? Lesen Sie hier, wie lange Sie Eier kochen müssen. Es kommt dabei auf die Größe der Eier und ihre Ausgangstemperatur an. Mit Kochzeitrechner.
perfect eggs cooking time
[50:00]
Understanding underlying structure of git:
- content addressable filesystem
- blobs and trees
- tags and branches as refs
- what does branching do
- what does merging do
- what does resetting do
- how to use the reflog to revert local actions
Learning Python should be fun and easy. We provide an interactive Python textbook that helps you learn to program in Python right in your browser.
Think like a programmer, seems like an immensely useful book.
Markup for keeping track of revisions and changes, good for editing and reviewing
and vim plugin
This is what I have been using for my todo list. If you use it, you should adjust the highlighting. This works for me using ConEmu on Windows 10...
A curated list of delightful productivity resources. - GintokiHub
Extensive description of concepts and uses of org-mode.
I don't use org-mode personally (the syntax falls just into the uncanny valley of markdown-like) but this covers concepts as well as uses, so might be useful outside a strict org-context as well.
CodiMD - Realtime collaborative markdown notes on all platforms. - codimd
Freelance Artist - beautiful wallpapers
incredibly simple linux distro with plain text packaging software -- when I have time; investigate
A tiny docker image with a working tectonic latex engine and biber with a primed cache.
Visit my page on docker hub at: https://hub.docker.com/r/dxjoke/tectonic-docker/ \
Visit my page on github at: https://github.com/WtfJoke/tectonic-docker \
Only ~75MB compressed.
A fully working latex engine. Packages that are not in the cache will be downloaded on demand.
I use this container to build my thesis automated. It includes bibtex8 and Glossaries
A guide to navigating of the competitive marketplace of web hosting companies and cloud service providers.
Gitless: a simple version control system built on top of Git
Automatically commits on saving and might be better suited for prose workflows?
I'm developing using Python and Django for a website. I want to take a BibTex entry and output it in a view in 3 different formats, MLA, APA, and Chicago. Is there a library out there that already ...
A powerful todo list application for the console, using the todo.txt format.
Supports:
- due dates
- recurring tasks
- dependent tasks
all in todotxt format. Written in python, with cli and tui interfaces
documentation here or on the wayback machine
also carries idea of text-based item identifiers which are more stable than default todotxt line-based ids (since when item is done or new ones added, its line can suddenly change)
Roam has a learning curve, but after a few weeks of playing with it I already love it much more than Evernote and Notion. Here's why, and how I'm using it.
from matrix+irc
hey y'all!
what's the most stable, resilient plugin for highlighting/completion/lsp
I've used so far coc.nvim and ALE and both combined but they don't perform very well comparing to VS code ecosystem
What do you folks use ?
mrassili joined the room.
mrassili
Hi
hey y'all!what's the most stable, resilient plugin for highlighting/completion/lspI've used so far coc.nvim and ALE and both combined but they don't perform very well comparing to VS code ecosystemWhat do you folks use ?
buu
coc
daz
what's your issue with coc? :^)
@jaawerth:matrix.org
I've had good experiences with both of the ones you've named. ALE's LSP support is more minimal but I've found coc requires a little elbow grease but is then hell on wheels
daz
also, what languages
@jaawerth:matrix.org
there's also the experimental LSP support in nvim 0.5.0 (aka master branch) + nvim-lsp but that's still a work in progress
(what's implemented thus far works welll though)
mrassili
I code mostly in React
combining JSX, js, CSSinJS code lacks support in both (in my experience)
@jaawerth:matrix.org
I haven't tried it in combination with CSSinJS but did you make sure to set the filetype to javascript.jsx or typescript.tsx (depending on whether you're using typescript)? iirc there's a note about that in coc-tsserver
buu
There's a vue language server that works pretty well
speaking of embedded stuff
mrassili
jaawerth looking into that
what about linting how do you handle that in coc?
@jaawerth:matrix.org
coc-eslint, which is a fork of vscode-eslint
assuming you're using eslint, which I am because there is no other linter that comes close in js these days ;-)
mrassili
using eslint
@jaawerth:matrix.org
coc has a pretty lush ecosystem of extensions that give you various LSP backends already tuned for coc integration and installable via :CocInstall, which is nice. you can also manually configure arbitrary LSP servers but the precooked integrations can save you some elbow grease
that's basically what nvim-lsp is - just a collection of presets + api glue for various LSP backends and install commands leveraging nvim 0.5.0's native lsp support
though coc goes further and crams in a bunch of stuff
mrassili
used them a bit and switched to ALE
@jaawerth:matrix.org
I do tend to prefer the way ALE provides linting feedback
mrassili
exactly
@jaawerth:matrix.org
in theory you could use both and just disable ALE's lsp support but I typically prefer minimizing the # of plugins if I can get similar functionality from both, and I just haven't bothered to find my optimal config that uses both together as of yet
clemons joined the room.
@jaawerth:matrix.org
and iirc there was an issue on getting ale and coc to play nice, something to do with the loclist
this https://github.com/dense-analysis/ale/issues/1945 you might be able to get around it by pointing one at the quickfix list and the other at the loclist but I didn't bother
ALE would clear location list that create from other plugin · Issue #1945 · dense-analysis/ale - GitHub
Information VIM version NVIM v0.3.2-462-gf2b555c9e Build type: Release Operating System: MacOS What went wrong https://github.com/w0rp/ale/blob/aa5c82b1718f44d04f6dd11bc63f6eeed2089d9d/autoload/ale...
I do like ALE's feedback better but if I'm going to use coc I am ok with its feedback in exchange for its other goodies
buu
What does ALE give you that coc doesn't?
daz
once i switched coc to use virtual text my linting life became nightmare^Wbetter
@jaawerth:matrix.org
buu: been a couple months since I've used ale but iirc it was just a ux thing in how it displayed the linter feedback
Foxfir3 joined the room.
mrassili
daz what do you mean by "virtual text"
@jaawerth:matrix.org
but daz makes a good point, I should play with that setting
daz
https://i.imgur.com/it5G8HR.png this bad boy
Foxfir3
how does kakoune bring anything new to the table?
daz
it has clippy
buu
daz: how do you enable that?
mrassili
never heard of kakoune
daz
buu: diagnostics.virtualText in cocconfig
@jaawerth:matrix.org
mrassili: there are settings like diagnostic.virtualText and diagnostic.virtualTextPrefix as well as highlight groupes you can override to change how it's displayed. should be documented in the coc help
daz
diagnostic.virtualText even
buu
Hmmmmmmmmmmmm
mrassili
I see
Tae Won Ha (Gitter)
Hi guys. If I execute :highlight in Neovim, it seems that Neovim does not accept any MsgPackRPC calls. What I did:
Launch nvim via NVIM_LISTEN_ADDRESS=/tmp/nvim.sock nvim and enter :highlight
Execute the following python script
from pynvim import attach
nvim = attach('socket', path='/tmp/nvim.sock')
print(nvim.api.get_mode())
I expected to get {'mode': 'r', 'blocking': True}, but the script waits and does not get a response from nvim. Is this intentional and if so, how can I detect this state?
Foxfir3
okay. well.. without the dog, Its not really great I suppose
Tae Won Ha (Gitter)
(edited) ... get {'mode': ... => ... get something like
{'mode': ...
buu
daz: You seem like you might know this
daz
know what :v
@jaawerth:matrix.org
mrassili: yeah if you :helpgrep virtualText or just :h coc-nvim and a search for virtualt, similarly you can see the highlight groups if you :h CocErrorVirtualText (which is the first one)
buu
daz: When I do CocCommand document.renameCurrentWord it works fine but the word I selected is highlighted in orange.. and stays highlighted after I finish running it
How do I get the hilight to go away
daz
maybe :nohl
Justin M. Keyes (Gitter)
@qvacua you would need to connect before checking nvim_get_mode
daz
maybe not, dunno :v
buu
daz: I think it's a different hl =[
I have all the search hilighting stuff off
Tae Won Ha (Gitter)
@justinmk I don't understand what you mean by connect?
Justin M. Keyes (Gitter)
@qvacua IOW nvim_get_mode will not block, but you need to be connected already.
NVIM_LISTEN_ADDRESS=/tmp/nvim.sock nvim
connect from API client
execute :hi
call nvim_get_mode from API client
the attach() step in your python sample code
Tae Won Ha (Gitter)
ah I see
Björn Linse (Gitter)
We could improve this, I think this was neovim/neovim#10506
[WIP] server: make rpc connection a "fast" event. by bfredl · Pull Request #10506 · neovim/neovim - GitHub
might avoid deadlock when connecting to $NVIM_LISTEN_ADDRESS from luv within the same process. Creating a RPC connection does nothing by itself so this should be safe. (ChanOpen autocmd is already ...
Justin M. Keyes (Gitter)
yeah.
@qvacua just FYI, to avoid this problem during startup, nvim --embed waits for UI to connect before doing any Vimscript init.
Tae Won Ha (Gitter)
So, with that PR, my simple script would work?
Justin M. Keyes (Gitter)
(explained a :help --embed)
(edited) (explained a :help ... => (explained at
:help ...
@jaawerth:matrix.org
buu: that's probably using the highlight groups coc uses under the hood (which I think is in the docs), I'm guessing you can clear it with :highlight clear or :highlight clear group-name to not set ALL highlighting back to defaults
you'd just have to figure out what group it's using for the latter
surprised there isn't something built into the plugign to provide more control for that though, I hate when highlights are still around after I'm done with 'em
maybe there is and I just don't know about it
buu
I'll try that next time I use it