emacs-mac port
brew tap railwaycat/emacsmacport
brew install emacs-mac --with-rsvg --with-no-title-bars --with-imagemagick --with-dbus
安装 gnu tools
brew install coreutils
# Make all GNU flavor commands available, may override same-name BSD flavor commands
# For x86 Mac
export PATH="/usr/local/opt/coreutils/libexec/gnubin:${PATH}"
export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:${MANPATH}"
# For M1 Mac
export PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:${PATH}"
export MANPATH="/opt/homebrew/opt/coreutils/libexec/gnuman:${MANPATH}"
- 尽可能不引入多余的 package,尽量使用 Emacs 内置的 package
- 如果能写一个 function 解决,则不引用 package
- 使用 vim 快捷键和操作方式
- 全面拥抱 lsp(language server protocol),本项目目前使用 eglot(后续准备切到 lsp-bridge,由懒猫开发的多线程 lsp 前端)
首先 clone 仓库,然后在仓库根目录运行以下命令更新 submodule:
git submodule init
git summodule update
- fd (https://github.com/sharkdp/fd) very fast!!
- ripgrep (https://github.com/BurntSushi/ripgrep) very very very fast!!!
- everything (windows only ) fatest file search program!!
- emacs-rime (https://github.com/DogLooksGood/emacs-rime)
使用 lsp server 为 pyright,安装方法如下:
pip install pyright
- 安装 vls
npm install -g vls
npm install -g @volar/vue-language-server
- 安装 html,css,json language server
npm i -g vscode-langservers-extracted.
- 安装 js 和 typescript 的 language server
npm install -g typescript-language-server typescript
注意,windows 平台 nodejs 版本,如果 nvm 版本小于 1.19 可能会有问题。 npm ERR! Unexpected token ‘.’ with with nvm-windows <= 1.1.7 #4234 npm/cli#4234
解决方法可以安装 node 16.13.2,我这边之前安装 16.15 LTS 有问题。
javascript:location.href='org-protocol://capture?template=x&url=%27+encodeURIComponent(location.href)+%27&title=%27+encodeURIComponent(document.title)+%27&body=%27+encodeURIComponent(function(){var%20html%20=%20%22%22;var%20sel%20=%20window.getSelection();if%20(sel.rangeCount)%20{var%20container%20=%20document.createElement(%22div%22);for%20(var%20i%20=%200,%20len%20=%20sel.rangeCount;%20i%20%3C%20len;%20++i)%20{container.appendChild(sel.getRangeAt(i).cloneContents());}html%20=%20container.innerHTML;}var%20dataDom%20=%20document.createElement(%27div%27);dataDom.innerHTML%20=%20html;dataDom.querySelectorAll(%27a%27).forEach(function(item,%20idx)%20{console.log(%27find%20a%20link%27);var%20url%20=%20new%20URL(item.href,%20window.location.href).href;var%20content%20=%20item.innerText;item.innerText%20=%20%27[[%27+url+%27][%27+content+%27]]%27;});[%27p%27,%20%27h1%27,%20%27h2%27,%20%27h3%27,%20%27h4%27].forEach(function(tag,%20idx){dataDom.querySelectorAll(tag).forEach(function(item,%20index)%20{var%20content%20=%20item.innerHTML.trim();if%20(content.length%20%3E%200)%20{item.innerHTML%20=%20content%20+%20%27 ';}});});return%20dataDom.innerText.trim();}())