跳至主要内容

博文

目前显示的是 八月, 2020的博文

Eglot mode with MS pylance language server

Step by Step how-to follows Install Pylance by any means. I did it by install it from VS Code plugin manager. (You know, language server is the VS Code thing). Install nodejs by any means. I did it by doing a choco install nodejs . In emacs M-x package-list-packages search for eglot-mode mark it to be installed with key i , then hit key x to install. Configure Emacs to initialize package-system and elgot by adding the following elisp snippets to init.el . ( require ' package ) (package-initialize) ( require ' eglot ) ;; VSCode install extentions in ~/.vscode or %UserProfile%\.vscode directory. e.g. ;; C:\\Users\\ekaifan\\.vscode\\extensions\\ms-python.vscode-pylance-2020.8.2\\server\\server.bundle.js (add-to-list 'eglot-server-programs '(python-mode . ( "node" "PATH_TO_YOUR_PYLANCE_SERVER_DOT_BUNDLE_DOT_JS" "--stdio" ))) (add-hook 'python-mode-hook 'eglot-ensure) Customize your eglot behavior by M-x customize-group

bfg is not always perfect

When something broken in your git lfs workflow It is awful when this happened in your packaging procedure. Image that, everything should have been a binary archive being end in a text point file in your installation media.. Nightmare.. So how could it happen? All begins with a repo optimization.. You have a repo full of binary files, and you want it to be clean and neat. You know that bfg will help you on the job. And did the convention with some magic file pattern like *.{jpg,png,zip,gz,tar} Then you replaced the repo, without any sanity test. Git lfs pointer files begins to show up in your source tree You got this after every git operation, as the git hooks did not work as expected. They don’t understand bfg generated filter rules in your .gitattribute file. Git lfs files shows as modfied after git lfs pull You know that git lfs pull can help you with pointer file => binary convertion. But it do not help much, as everything converted

Use keeagent as ssh-agent for openssh clients inside WSL

A great python to save keepass WSL user in windows If you are a keepass user, chances are that you are also a keeagent user, chances are that you are also a WSL user. You want all your passwords and ssh keys managed by keepass , and automatically served by the great keeagent plugin. As with putty, mobaxterm, git bash, win10 bundled OpenSSH all works well with trivial additional setup. You will expect the real OpenSSH inside your WSL environment to work as well. msysgit2unix-socket.py Get the tool and setup it in your WSL, and then you get it. Try ssh-add -l or ssh to any of your usual ssh target after restart your WSL terminal. https://gist.github.com/kevinvalk/3ccd5b360fd568862b4a397a9df9ed26

Use rmdir instead of del to delete the symblic link (itself) in windows to prevent data loss

Use rmdir if you want to remove just the directory symbolic link (by itself.) When you begin to live with (make use of) symbolic links in windows. You may have to remove some symbolic links for maintenance. It feels all okay until symbolic links whose target are directories, those created by /d parameters by `mklink` tool, comes into play. Don't use the del command, as it will recursively delete all the files under the target directory. Use rmdir to delete just the symbolic link itself. Reference: https://superuser.com/questions/167076/how-can-i-delete-a-symbolic-link