mise++
This commit is contained in:
parent
6471e799a8
commit
931e9d4aee
93 changed files with 6881 additions and 8 deletions
3
vim/plugins/vim-elixir-master/bin/nvim
Executable file
3
vim/plugins/vim-elixir-master/bin/nvim
Executable file
|
@ -0,0 +1,3 @@
|
|||
#! /usr/bin/env sh
|
||||
docker-compose build
|
||||
docker-compose run nvim nvim $1
|
25
vim/plugins/vim-elixir-master/bin/profile
Executable file
25
vim/plugins/vim-elixir-master/bin/profile
Executable file
|
@ -0,0 +1,25 @@
|
|||
#! /usr/bin/env ruby
|
||||
require 'bundler/setup'
|
||||
require 'vimrunner'
|
||||
dir = File.expand_path('..', __dir__)
|
||||
plugin = 'ftdetect/elixir.vim'
|
||||
vim = Vimrunner.start_gvim
|
||||
vim.add_plugin(dir, plugin)
|
||||
vim.normal ':let g:elixir_indent_debug=0<CR>'
|
||||
vim.edit! 'large_file.ex'
|
||||
# remove all indentation
|
||||
vim.normal 'ggVG999<<'
|
||||
vim.normal ':profile start profile.log<CR>'
|
||||
vim.normal ':profile func *<CR>'
|
||||
vim.normal ':profile file *<CR>'
|
||||
|
||||
t1 = Time.now
|
||||
# force vim to indent the file
|
||||
vim.normal 'gg=G'
|
||||
vim.normal ':profile pause<CR>'
|
||||
vim.normal ':q!<CR>'
|
||||
|
||||
Process.wait vim.server.pid
|
||||
t2 = Time.now
|
||||
|
||||
puts "Took #{t2-t1} seconds to indent large_file.ex. Profile logged to profile.log"
|
8
vim/plugins/vim-elixir-master/bin/projects_to_test.txt
Normal file
8
vim/plugins/vim-elixir-master/bin/projects_to_test.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
wistia/ttl_cache
|
||||
wistia/generational_cache
|
||||
wistia/gen_poller
|
||||
wistia/assignment_ex
|
||||
wistia/http_monitor
|
||||
wistia/impersonate_ex
|
||||
wistia/m3u8_parser
|
||||
wistia/simple_http_server
|
17
vim/plugins/vim-elixir-master/bin/rspec
Executable file
17
vim/plugins/vim-elixir-master/bin/rspec
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
#
|
||||
# This file was generated by Bundler.
|
||||
#
|
||||
# The application 'rspec' is installed as part of a gem, and
|
||||
# this file is here to facilitate running it.
|
||||
#
|
||||
|
||||
require "pathname"
|
||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
||||
Pathname.new(__FILE__).realpath)
|
||||
|
||||
require "rubygems"
|
||||
require "bundler/setup"
|
||||
|
||||
load Gem.bin_path("rspec-core", "rspec")
|
3
vim/plugins/vim-elixir-master/bin/test_directory
Executable file
3
vim/plugins/vim-elixir-master/bin/test_directory
Executable file
|
@ -0,0 +1,3 @@
|
|||
#! /usr/bin/env sh
|
||||
dirs=`find $1 -iname '*.ex' -o -iname '*.exs' | grep -v '/deps/'`
|
||||
bin/test_indent $dirs
|
3
vim/plugins/vim-elixir-master/bin/test_for_regressions
Executable file
3
vim/plugins/vim-elixir-master/bin/test_for_regressions
Executable file
|
@ -0,0 +1,3 @@
|
|||
#! /usr/bin/env sh
|
||||
rm -rf tmp
|
||||
cat bin/projects_to_test.txt | xargs -n 1 -I{} sh -c 'git clone -q git@github.com:{}.git tmp && echo "Testing directory: {}..." && bin/test_directory tmp && rm -rf tmp'
|
57
vim/plugins/vim-elixir-master/bin/test_indent
Executable file
57
vim/plugins/vim-elixir-master/bin/test_indent
Executable file
|
@ -0,0 +1,57 @@
|
|||
#! /usr/bin/env ruby
|
||||
require 'bundler/setup'
|
||||
require 'vimrunner'
|
||||
require 'diffy'
|
||||
require 'fileutils'
|
||||
|
||||
dir = File.expand_path('..', __dir__)
|
||||
plugin = 'ftdetect/elixir.vim'
|
||||
|
||||
def bm
|
||||
t1 = Time.now
|
||||
yield
|
||||
Time.now - t1
|
||||
end
|
||||
|
||||
def detect_change(f)
|
||||
pre = File.read(f)
|
||||
pre = strip_doc_blocks(pre)
|
||||
yield
|
||||
post = File.read('test_indent.result')
|
||||
post = strip_doc_blocks(post)
|
||||
pre == post ? nil : Diffy::Diff.new(pre, post)
|
||||
end
|
||||
|
||||
def strip_doc_blocks(body)
|
||||
body.gsub(/@\w+ """.*"""/m, '')
|
||||
end
|
||||
|
||||
|
||||
ARGV.each do |f|
|
||||
vim = Vimrunner.start_gvim
|
||||
vim.add_plugin(dir, plugin)
|
||||
|
||||
vim.edit! f
|
||||
|
||||
print "## Testing #{File.expand_path(f)} ... "
|
||||
time = nil
|
||||
diff = detect_change(f) do
|
||||
time = bm do
|
||||
vim.normal 'ggVG999<<'
|
||||
vim.normal 'gg=G'
|
||||
vim.normal ':w! test_indent.result<CR>'
|
||||
|
||||
vim.normal ':q!<CR>'
|
||||
Process.wait vim.server.pid
|
||||
end
|
||||
end
|
||||
|
||||
if diff
|
||||
puts "error [#{time}s]"
|
||||
puts diff
|
||||
else
|
||||
puts "ok [#{time}s]"
|
||||
end
|
||||
end
|
||||
|
||||
FileUtils.rm 'test_indent.result'
|
3
vim/plugins/vim-elixir-master/bin/vim
Executable file
3
vim/plugins/vim-elixir-master/bin/vim
Executable file
|
@ -0,0 +1,3 @@
|
|||
#! /usr/bin/env sh
|
||||
docker-compose build
|
||||
docker-compose run vim
|
Loading…
Add table
Add a link
Reference in a new issue