#TIL you can use gf to open a file under the current cursor position in VIM, I was reading this post I found in Hacker News and I was wondering if evil-mode has this functionality as well evil-mode has this key binding defined and it uses (find-file-at-point), it works well for absolute paths but not for relative paths and I wanted to use it for a path like this templates/home.html so I wrote some elisp code to be able to make what I want: (defun my/find-file-under-cursor () "Check it the fil...| (ノ°Д°)ノ︵ ┻━┻
#TIL it is possible to create memes in emacs using meme, this package allow to choose an image and add some text to it, we can also select any image and use it. Installation This package, at the time of writing this, is not available on melpa so we have to install it manually or using straight.el or quelpa, because I'm using straight.el for my config we'll use that.| (ノ°Д°)ノ︵ ┻━┻
I usually share some links of Twitter(it is known as X now but I still call it Twitter) in Telegram, but for some reason the previews doesn't work well most of the times. One solution was to edit a Twitter link so I can use vxtwitter.com instead of twitter.com, this provides better previews but doing it that way is too manual so I made a bot to detect when I share a Twitter link and edit the message to use vxtwitter.| (ノ°Д°)ノ︵ ┻━┻
D2 is declarative language to generate diagrams, it's like mermaid on steroids, it has a cli so it's easy to use. Hugo doesn't support it at the moment of writing this, there is an open issue where the conversation is being done. So in the meantime official support is added we're going to make our own integration. It will have 2 parts: A little HTTP server that receives the d2 code and return a resulting SVG A custom hugo code block render hook A simple HTTP server in go This server only uses...| (ノ°Д°)ノ︵ ┻━┻
Mermaid.js is a great tool to make diagrams in plain text, I use it a lot and I wanted to have a way to see previews of the code I was writing. There are some options to do that but they require to have a mermaid-cli installed, which requires nodejs as well. Emacs has a built-in webkit browser, in case it was compiled with --with-xwidgets flag, and mermaid run on js so it should be possible to just run the code I want in the browser and see it there.| (ノ°Д°)ノ︵ ┻━┻
I'm currently using emacs 30 and this version has support for more languages using the new ts-modes, I've been using emacs-tree-sitter package since Emacs added dynamic modules feature. Now using emacs 30 I give a try to use only ts-modes and maybe delete some external packages I was using. How to install grammars Emacs doesn't have a built-in way to install automatically most common grammar so we're going to use a package that can handle that, we use tree-sitter-langs package, which is a rep...| erick.navarro.io