Skip to content

Instantly share code, notes, and snippets.

View tsukkee's full-sized avatar

Takayuki Tsukitani tsukkee

View GitHub Profile

Volar 2.0: The Rewrite

I'm Johnson, the author of Volar (now Vue Language Tools). We released 2.0 in March 2024. This is a look back at what we changed, why, and what it cost.

Why we needed to rewrite

Vetur and Volar v1 implemented Vue's IDE support through the Language Server Protocol. For small and medium projects this worked fine. For larger projects it broke down, and the reason was always the same: memory.

TypeScript Server and the Vue Language Server each kept their own copy of the project's TS AST — every file, every .d.ts in node_modules. When a project pulled in thousands of .d.ts files (common for anything with a big dependency tree), the two processes together could exhaust available memory.

@anekos
anekos / feedeen.com.js
Last active August 29, 2015 14:07
feedeen.com for vimperator
(function () {
let A = Array.slice;
const selectors = {
selectedEntry: '.fd_focus',
currentFeedTitle: '.fd_current_feed_title',
feeds: '.fd_feed',
feedTitle: '.fd_feed_title',

author thinca date 2012/05/27 place yokohama.vim #3 font VL ゴシック 26 font Migu_2M:h38:cSHIFTJIS

quickrun.vim の 詳解

2012/05/27 yokohama.vim #3 thinca

let s:n = 1
let s:q = ''
function! s:fizzbuzz()
if !len(s:q)
if s:n % 3 == 0 && s:n % 5 == 0
let s:q = "fizzbuzz "
elseif s:n % 3 == 0
let s:q = "fizz "
elseif s:n % 5 == 0
let s:q = "buzz "
@shokai
shokai / mount_ramdisk
Created August 5, 2011 06:48
mount ramdisk on Mac OSX
#!/usr/bin/env ruby
mount = '/Volumes/ramdisk'
newfs = '/dev/disk1'
if !ARGV.empty? and ARGV.first =~ /^-+u$/i
system "umount #{mount} && hdiutil detach #{newfs}"
else
if File.exists? newfs
STDERR.puts "already mounted - #{mount}"
STDERR.puts "use \"#{$0.split('/').last} -u\""
@bongole
bongole / tmux.rb
Created July 14, 2011 08:18
brew tmux-1.5 pbcopy fix patch
require 'formula'
class Tmux < Formula
url 'http://sourceforge.net/projects/tmux/files/tmux/tmux-1.5/tmux-1.5.tar.gz'
md5 '3d4b683572af34e83bc8b183a8285263'
homepage 'http://tmux.sourceforge.net'
depends_on 'libevent'
def patches
@hotchpotch
hotchpotch / cocproxy.nginx.conf
Created May 25, 2011 04:50
cocproxy for nginx
#!nginx -p . -c cocproxy.nginx.conf
error_log /dev/stderr debug;
daemon off;
events {
worker_connections 48;
}
http {
@ynkdir
ynkdir / nsexample.vim
Created March 13, 2011 05:28
nsexample.vim
" 基本アイデア: 名前空間を実行時の環境に合わせることでファイルの変更なし
" にコピーできるようにする。
let s:ns = expand('<sfile>:p:r:gs?[\\/]?#?:s?^.*#autoload#??:s?$?#?')
function {s:ns}func()
echo "func()"
endfunction
" lingr.vim {{{
" from thinca's .vimrc {{{
" http://soralabo.net/s/vrcb/s/thinca
if !exists('g:lingr')
call rtputil#remove('\<lingr-vim\>')
endif
if 0
@eagletmt
eagletmt / clang_complete.vim
Created October 30, 2010 15:52
neocomplcache plugin to complete in C/C++ using clang
" original: http://github.com/Rip-Rip/clang_complete
" File: clang_complete.vim
" Author: Xavier Deguillard <deguilx@gmail.com>
" Modified by: eagletmt <eagletmt@gmail.com>
"
" Description: Use of clang to complete in C/C++.
"
" Configuration: Each project can have a .clang_complete at his root,
" containing the compiler options. This is useful if