diff --git a/.github/scripts/vim_startuptime_to_json.py b/.github/scripts/vim_startuptime_to_json.py deleted file mode 100644 index 3a52c6c..0000000 --- a/.github/scripts/vim_startuptime_to_json.py +++ /dev/null @@ -1,149 +0,0 @@ -import json -import pathlib -import argparse -import dataclasses -import datetime -import logging - -# ロガーの準備 -# https://stackoverflow.com/questions/10973362/python-logging-function-name-file-name-line-number-using-a-single-file -logger = logging.getLogger(__name__) -FORMAT = "[%(filename)s:%(lineno)s - %(funcName)20s() ] %(message)s" -logging.basicConfig(format=FORMAT) -logger.setLevel(logging.DEBUG) - -@dataclasses.dataclass -class Detail: - average_ms: float - max_ms: float - min_ms: float - subject: str - -@dataclasses.dataclass -class BenchmarkResult: - datetime: str - branch: str - average_ms: float - max_ms: float - min_ms: float - details: list[Detail] - full_text: list[str] - -def reset_benchmarks_json(path: pathlib.Path) -> None: - """benchmarks.jsonをリセットする - - Args: - path: benchmarks.jsonの場所 - """ - logger.debug(f'resetting {path}') - with open(path, mode='w+', encoding='UTF-8') as f: - f.write('{"benchmarks": []}') - logger.debug(f'reset {path}') - -def append_to_benchmarks_json(result: BenchmarkResult, path: pathlib.Path) -> None: - """benchmarks.jsonにベンチマーク結果を追加する - - Args: - result: ベンチマーク結果 - path: benchmarks.jsonの場所 - """ - logger.debug(f'loading benchmarks from {path}') - with open(path, mode='r', encoding='UTF-8') as f: - obj = json.load(f) - logger.debug(f'loaded benchmarks from {path}') - obj['benchmarks'].append(dataclasses.asdict(result)) - logger.debug(f'writing benchmarks to {path}') - with open(path, mode='w+', encoding='UTF-8') as f: - json.dump(obj, f) - logger.debug(f'wrote benchmarks to {path}') - -def parse_startuptime_result(branch: str, now: str, lines: list[str]) -> BenchmarkResult: - """vim-startuptimeの実行結果をパースしする - - Args: - lines: vim-startuptimeの実行結果のテキスト - """ - average_ms = -1 - max_ms = -1 - min_ms = -1 - details_mode = False - details = [] - - logger.debug('parsing vim-startuptime result') - for line in lines: - if line.startswith('Total Average'): - parts = line.split() - average_ms = float(parts[2]) - logger.debug(f'found average_ms: {average_ms}') - elif line.startswith('Total Max'): - parts = line.split() - max_ms = float(parts[2]) - logger.debug(f'found max_ms: {max_ms}') - elif line.startswith('Total Min'): - parts = line.split() - min_ms = float(parts[2]) - logger.debug(f'found min_ms: {min_ms}') - elif line.startswith('-----'): - details_mode = True - logger.debug('details_mode on') - elif details_mode: - parts = line.split(sep=':', maxsplit=2) - assert len(parts) == 2 - times = parts[0].split() - detail_avg = float(times[0]) - detail_max = float(times[1]) - detail_min = float(times[2]) - subject = parts[1].strip() - detail = Detail( - average_ms=detail_avg, - max_ms=detail_max, - min_ms=detail_min, - subject=subject - ) - details.append(detail) - - assert average_ms >= 0 - assert max_ms >= 0 - assert min_ms >= 0 - benchmark_result = BenchmarkResult( - datetime=now, - branch=branch, - average_ms=average_ms, - max_ms=max_ms, - min_ms=min_ms, - details=details, - full_text=lines - ) - return benchmark_result - -def main(args) -> None: - logger.debug(f'args={args}') - input_path = pathlib.Path(args.input) - output_path = pathlib.Path(args.output) - - # 入力ファイルが存在しなければエラー - if not input_path.is_file(): - logger.error(f'{input_path} is not file') - raise Exception(f'{input_path} is not file') - - # 出力ファイル(benchmarks.json)が存在しなければ初期化する - if not output_path.is_file(): - reset_benchmarks_json(output_path) - - with open(input_path, mode='r', encoding='UTF-8') as f: - startuptime_text = f.readlines() - - branch = args.branch - now = datetime.datetime.now().isoformat() - benchmark_result = parse_startuptime_result(branch, now, startuptime_text) - logger.debug(f'benchmark_result={benchmark_result}') - append_to_benchmarks_json(benchmark_result, output_path) - - -if __name__ == "__main__": - parser = argparse.ArgumentParser() - parser.add_argument('-i', '--input', required=True) - parser.add_argument('-o', '--output', required=True) - parser.add_argument('-b', '--branch', required=True) - args = parser.parse_args() - main(args) diff --git a/.github/workflows/nvim_bench.yml b/.github/workflows/nvim_bench.yml deleted file mode 100644 index d3c9bb4..0000000 --- a/.github/workflows/nvim_bench.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: 'Neovim Benchmark' - -on: - workflow_dispatch: - push: - branches: - - main - pull_request: - -permissions: - contents: write - pages: write - id-token: write - -jobs: - benchmark: - runs-on: ubuntu-latest - steps: - - name: '[Setup > repo] Checkout' - uses: actions/checkout@v3 - with: - ref: ${{ github.head_ref }} - - - name: '[Setup > vim-startuptime] Download' - run: wget https://github.com/rhysd/vim-startuptime/releases/download/v1.3.1/vim-startuptime_1.3.1_linux_amd64.tar.gz - - name: '[Setup > vim-startuptime] Extract' - run: tar -xvf vim-startuptime_1.3.1_linux_amd64.tar.gz - - name: '[Setup > vim-startuptime] Install' - run: | - mv vim-startuptime /usr/local/bin/vim-startuptime - chmod +x /usr/local/bin/vim-startuptime - - - name: '[Setup > Neovim]' - uses: rhysd/action-setup-vim@v1 - with: - neovim: true - - name: '[Setup > Neovim] Install config' - run: ./dotfiles install neovim - - name: '[Setup > Neovim] Install plugins' - run: nvim --headless -c 'Lazy! restore' -c 'qall' - - - name: '[Benchmark > Pre] Pull gh-pages branch' - run: | - git clean -f -d - git checkout . - git pull origin gh-pages --rebase - - - name: '[Benchmark]' - run: vim-startuptime -vimpath nvim | tee ../result.txt - env: - TERM: screen-256color - - - name: '[Benchmark > Post] Download past results' - run: | - wget https://raw.githubusercontent.com/yuma140902/dotfiles-public/gh-pages/docs/benchmarks.json - - name: '[Benchmark > Post] Parse result' - run: python .github/scripts/vim_startuptime_to_json.py -i ../result.txt -o ./benchmarks.json -b ${GITHUB_REF##*/} - - name: '[Benchmark > Post] Commit' - uses: stefanzweifel/git-auto-commit-action@v4 - with: - branch: gh-pages - create_branch: true - commit_message: 'doc: update benchmarks.json [skip ci]' - file_pattern: './benchmarks.json' diff --git a/README.md b/README.md deleted file mode 100644 index c0d80ea..0000000 --- a/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# dotfiles - -- 設定ファイルの設置のみを行います。 -- パッケージのインストールは行いません。 -- 設定ファイルはアプリケーションごとにモジュールという単位で分けていて、`./dotfiles`スクリプトで個別にインストールできます。 - -## 動作環境 - -- OS - - Linux - - Windows - - (macOS) -- Python 3 - -## インストール方法 - -まずリポジトリをクローンします。クローン先は自由です。 - -```sh -git clone https://github.com/yuma140902/dotfiles-public -cd dotfiles-public -``` - -次に`./dotfiles`を使って必要なモジュールをインストールします。 - -``` -> ./dotfiles --help -usage: dotfiles [-h] [-y] [-v] {install,list,info} ... - -options: - -h, --help show this help message and exit - -y, --noconfirm ユーザーに入力を求めない - -v, --version show program's version number and exit - -Sub Commands: - {install,list,info} - install モジュールをインストールする - list モジュールを一覧表示する - info モジュールの情報を表示する - -> ./dotfiles install --help -usage: dotfiles install [-h] [-f] [-a] [-p PATH] [MODULE ...] - -positional arguments: - MODULE インストールするモジュールの名前 - -options: - -h, --help show this help message and exit - -f, --allow-overwrite - 設定ファイル等の上書きを許可する。上書きされたファイルは"元のファイル名.日時.bak"などの名前で残される - -a, --all すべてのモジュールをインストールする - -p PATH, --path PATH --allが指定されたときの探索パス. デフォルト: "." - -> ./dotfiles list --help -usage: dotfiles list [-h] [-p PATH] - -options: - -h, --help show this help message and exit - -p PATH, --path PATH --allが指定されたときの探索パス. デフォルト: "." - -> ./dotfiles info --help -usage: dotfiles info [-h] MODULE - -positional arguments: - MODULE - -options: - -h, --help show this help message and exit -``` diff --git a/cargo/config.toml b/cargo/config.toml deleted file mode 100644 index e69de29..0000000 diff --git a/cargo/manifest.json b/cargo/manifest.json deleted file mode 100644 index 60a7306..0000000 --- a/cargo/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "files": [ - { - "src": "config.toml", - "dst": ".cargo/config.toml" - } - ] -} diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 6f8acb3..0000000 --- a/docs/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# ドキュメント - -## `manifest.json`の書き方 - -### 例1 - -`${HOME}/.zshrc`から`dotfiles/zsh/.zshrc`へのリンクを作る。 - -ディレクトリ構造: - -- dotfiles/zsh/ - - manifest.json - - .zshrc - -manifest.json - -```json -{ - "name": "zsh", - "description": "...", - "files": [ - ".zshrc" - ] -} -``` - -### 例2 - -- dotfiles/neovim/ - - manifest.json - - nvim/ - - init.lua - - lua/ - - ... - - ftplugin - - ... - -```json -{ - "name": "Neovim", - "files": [ - { - "src": "nvim", - "dst": "${XDG_CONFIG_HOME}/nvim" - } - ] -} -``` - -### 例3 - -- dotfiles/git - - .gitconfig.linux - - .gitconfig.windows - -```json -{ - "name": "Git", - "files": [ - { - "cond": "platform.system() in ('Linux', 'Darwin')", - "src": ".gitconfig.linux", - "dst": ".gitconfig" - }, - { - "cond": "platform.system() == 'Windows'", - "src": ".gitconfig.windows", - "dst": ".gitconfig" - } - ] -} -``` - -### `cond`について - -`cond`はbool値を返すPythonコードを書くことができる。`platform`モジュールを使うことができる。 - -### `dest`で使える変数について - -`dest`の先頭でのみ、以下の変数を使うことができる。 - -- `${HOME}` - ユーザーのホームディレクトリ -- `${XDG_CONFIG_HOME}` - `XDG_CONFIG_HOME`環境変数。デフォルト値は`${HOME}/.config`または`%LOCALAPPDATA%`。 -- `${XDG_DATA_HOME}` - `XDG_DATA_HOME`環境変数。デフォルト値は`${HOME}/.local/share`または`%LOCALAPPDATA%`。 -- `${XDG_STATE_HOME}` - `XDG_STATE_HOME`環境変数。デフォルト値は`${HOME}/.local/state`または`%APPDATA%`。 diff --git a/docs/benchmarks.json b/docs/benchmarks.json new file mode 100644 index 0000000..f0ab44d --- /dev/null +++ b/docs/benchmarks.json @@ -0,0 +1 @@ +{"benchmarks": [{"datetime": "2023-09-10T18:10:11.097835", "branch": "refs/pull/16/merge", "average_ms": 63.3531, "max_ms": 66.246, "min_ms": 60.369}, {"datetime": "2023-09-10T18:15:44.767546", "branch": "refs/heads/master", "average_ms": 48.2296, "max_ms": 51.335, "min_ms": 46.35}, {"datetime": "2023-09-10T18:24:26.940124", "branch": "refs/pull/17/merge", "average_ms": 60.7651, "max_ms": 66.136, "min_ms": 57.342}, {"datetime": "2023-09-10T18:33:43.530015", "branch": "refs/heads/master", "average_ms": 48.5771, "max_ms": 49.279, "min_ms": 47.75}, {"datetime": "2023-09-10T18:35:52.691131", "branch": "refs/heads/master", "average_ms": 48.0584, "max_ms": 50.134, "min_ms": 46.68}, {"datetime": "2023-09-11T20:47:17.333027", "branch": "refs/heads/master", "average_ms": 50.3768, "max_ms": 51.767, "min_ms": 49.301}, {"datetime": "2023-09-11T20:57:37.010191", "branch": "refs/heads/master", "average_ms": 58.3, "max_ms": 61.87, "min_ms": 55.54}, {"datetime": "2023-09-20T11:51:25.218619", "branch": "refs/heads/master", "average_ms": 49.8606, "max_ms": 51.455, "min_ms": 49.032}, {"datetime": "2023-09-20T13:42:55.463798", "branch": "refs/heads/master", "average_ms": 50.7655, "max_ms": 52.444, "min_ms": 48.885}, {"datetime": "2023-10-02T20:53:02.321913", "branch": "refs/heads/master", "average_ms": 50.6904, "max_ms": 52.536, "min_ms": 49.226}, {"datetime": "2023-10-10T14:00:06.835698", "branch": "refs/heads/master", "average_ms": 52.8685, "max_ms": 56.461, "min_ms": 49.093}, {"datetime": "2023-10-12T11:01:06.670792", "branch": "refs/heads/master", "average_ms": 50.8621, "max_ms": 52.026, "min_ms": 49.735}, {"datetime": "2023-10-24T09:28:34.862083", "branch": "refs/heads/master", "average_ms": 68.3203, "max_ms": 74.425, "min_ms": 64.663}, {"datetime": "2023-10-27T09:49:25.682687", "branch": "refs/heads/master", "average_ms": 50.6642, "max_ms": 53.197, "min_ms": 48.835}, {"datetime": "2023-10-28T22:03:04.067500", "branch": "refs/heads/master", "average_ms": 66.4795, "max_ms": 70.699, "min_ms": 62.932}, {"datetime": "2023-11-02T13:42:33.461470", "branch": "refs/heads/master", "average_ms": 51.4297, "max_ms": 52.913, "min_ms": 49.722}, {"datetime": "2023-11-02T15:52:27.880302", "branch": "refs/heads/master", "average_ms": 52.0683, "max_ms": 56.412, "min_ms": 49.968}, {"datetime": "2023-11-03T10:59:49.277362", "branch": "refs/heads/master", "average_ms": 62.8776, "max_ms": 67.216, "min_ms": 59.922}, {"datetime": "2023-11-07T13:21:57.352467", "branch": "refs/heads/master", "average_ms": 52.9373, "max_ms": 54.739, "min_ms": 50.493}, {"datetime": "2023-11-09T15:56:58.120977", "branch": "refs/heads/master", "average_ms": 53.1041, "max_ms": 55.9, "min_ms": 51.332}, {"datetime": "2023-12-05T14:11:09.691508", "branch": "refs/heads/master", "average_ms": 42.1771, "max_ms": 44.069, "min_ms": 40.68}, {"datetime": "2023-12-07T22:28:05.142318", "branch": "refs/heads/master", "average_ms": 43.4271, "max_ms": 44.874, "min_ms": 41.902}, {"datetime": "2023-12-15T16:20:55.089152", "branch": "refs/heads/master", "average_ms": 42.8631, "max_ms": 44.954, "min_ms": 40.177}, {"datetime": "2023-12-15T16:39:56.367601", "branch": "refs/heads/master", "average_ms": 42.23, "max_ms": 43.727, "min_ms": 40.618}, {"datetime": "2023-12-15T16:51:12.479233", "branch": "refs/heads/master", "average_ms": 43.2436, "max_ms": 44.611, "min_ms": 42.697}, {"datetime": "2023-12-15T17:23:59.409344", "branch": "refs/heads/master", "average_ms": 43.7808, "max_ms": 44.807, "min_ms": 42.87}, {"datetime": "2023-12-15T17:51:39.747903", "branch": "refs/heads/master", "average_ms": 44.2497, "max_ms": 47.813, "min_ms": 41.575}, {"datetime": "2023-12-15T18:17:57.159256", "branch": "refs/heads/master", "average_ms": 43.4471, "max_ms": 44.424, "min_ms": 42.537}, {"datetime": "2023-12-15T19:05:03.927926", "branch": "refs/heads/master", "average_ms": 42.0192, "max_ms": 43.728, "min_ms": 41.025}, {"datetime": "2023-12-15T20:12:51.578868", "branch": "refs/heads/master", "average_ms": 60.3157, "max_ms": 64.108, "min_ms": 58.888}, {"datetime": "2023-12-15T23:05:48.695818", "branch": "refs/heads/master", "average_ms": 62.9542, "max_ms": 66.077, "min_ms": 61.177}, {"datetime": "2023-12-15T23:40:20.185881", "branch": "refs/heads/master", "average_ms": 62.9207, "max_ms": 64.611, "min_ms": 60.984}, {"datetime": "2023-12-16T04:56:53.748145", "branch": "refs/heads/master", "average_ms": 64.9689, "max_ms": 67.394, "min_ms": 63.892}, {"datetime": "2023-12-16T05:05:08.129645", "branch": "refs/heads/master", "average_ms": 66.2089, "max_ms": 71.661, "min_ms": 62.693}, {"datetime": "2023-12-16T05:34:22.032204", "branch": "refs/heads/master", "average_ms": 65.8724, "max_ms": 69.582, "min_ms": 63.455}, {"datetime": "2023-12-16T06:02:01.702172", "branch": "refs/heads/master", "average_ms": 62.6703, "max_ms": 64.733, "min_ms": 60.333}, {"datetime": "2023-12-16T13:17:17.780261", "branch": "refs/heads/master", "average_ms": 64.5286, "max_ms": 69.663, "min_ms": 62.462}, {"datetime": "2023-12-16T13:58:44.138013", "branch": "refs/heads/master", "average_ms": 62.6729, "max_ms": 65.871, "min_ms": 61.155}, {"datetime": "2023-12-17T15:41:25.328923", "branch": "refs/heads/master", "average_ms": 62.8532, "max_ms": 66.63, "min_ms": 60.478}, {"datetime": "2023-12-17T23:44:25.121522", "branch": "refs/heads/master", "average_ms": 63.2341, "max_ms": 64.819, "min_ms": 61.638}, {"datetime": "2023-12-18T16:04:59.017247", "branch": "refs/heads/master", "average_ms": 29.0138, "max_ms": 30.498, "min_ms": 27.616}, {"datetime": "2023-12-19T02:22:12.435458", "branch": "refs/heads/master", "average_ms": 29.0944, "max_ms": 30.882, "min_ms": 27.601}, {"datetime": "2023-12-19T02:32:44.840285", "branch": "refs/heads/master", "average_ms": 29.2373, "max_ms": 30.304, "min_ms": 27.987}, {"datetime": "2023-12-21T13:54:35.422056", "branch": "refs/heads/master", "average_ms": 29.2379, "max_ms": 30.559, "min_ms": 27.594}, {"datetime": "2023-12-29T19:25:20.018837", "branch": "refs/heads/master", "average_ms": 29.5208, "max_ms": 30.811, "min_ms": 28.376}, {"datetime": "2024-01-10T20:00:37.504571", "branch": "refs/heads/master", "average_ms": 32.6448, "max_ms": 40.271, "min_ms": 28.569}, {"datetime": "2024-01-14T01:39:20.905469", "branch": "refs/heads/master", "average_ms": 32.3818, "max_ms": 41.056, "min_ms": 27.834}, {"datetime": "2024-01-17T10:27:31.805853", "branch": "refs/heads/master", "average_ms": 88.5843, "max_ms": 119.733, "min_ms": 62.191}, {"datetime": "2024-01-22T15:47:40.521551", "branch": "refs/heads/master", "average_ms": 36.7668, "max_ms": 40.479, "min_ms": 28.718}, {"datetime": "2024-02-01T23:34:39.978570", "branch": "refs/heads/master", "average_ms": 33.8567, "max_ms": 41.964, "min_ms": 29.227}, {"datetime": "2024-02-02T00:12:22.450475", "branch": "refs/heads/master", "average_ms": 35.2576, "max_ms": 38.812, "min_ms": 26.737}, {"datetime": "2024-02-02T00:19:10.418378", "branch": "refs/heads/master", "average_ms": 33.8681, "max_ms": 39.101, "min_ms": 26.629}, {"datetime": "2024-02-02T00:24:13.482355", "branch": "refs/heads/master", "average_ms": 33.62, "max_ms": 37.976, "min_ms": 27.277}, {"datetime": "2024-02-02T00:32:38.656887", "branch": "refs/heads/master", "average_ms": 30.5722, "max_ms": 39.205, "min_ms": 28.743}, {"datetime": "2024-02-02T00:42:25.315686", "branch": "refs/heads/master", "average_ms": 30.1737, "max_ms": 39.466, "min_ms": 27.008}, {"datetime": "2024-02-05T22:33:02.021368", "branch": "refs/heads/master", "average_ms": 34.3053, "max_ms": 39.489, "min_ms": 27.598}, {"datetime": "2024-02-12T01:14:28.846602", "branch": "refs/heads/master", "average_ms": 31.418, "max_ms": 40.716, "min_ms": 27.886}, {"datetime": "2024-02-16T13:20:01.571567", "branch": "refs/heads/master", "average_ms": 31.6299, "max_ms": 39.167, "min_ms": 26.545}, {"datetime": "2024-02-19T02:04:59.341371", "branch": "refs/heads/master", "average_ms": 32.7984, "max_ms": 38.965, "min_ms": 26.702}, {"datetime": "2024-02-19T03:21:03.789259", "branch": "refs/heads/master", "average_ms": 34.4856, "max_ms": 39.534, "min_ms": 26.78}, {"datetime": "2024-02-20T03:16:54.847354", "branch": "refs/heads/master", "average_ms": 35.222, "max_ms": 40.657, "min_ms": 28.122}, {"datetime": "2024-02-20T17:32:58.174004", "branch": "refs/heads/master", "average_ms": 29.8414, "max_ms": 39.838, "min_ms": 26.973}, {"datetime": "2024-02-22T13:17:20.056510", "branch": "refs/heads/master", "average_ms": 30.9051, "max_ms": 37.741, "min_ms": 27.466}, {"datetime": "2024-03-06T18:47:03.950579", "branch": "refs/heads/master", "average_ms": 33.041, "max_ms": 39.281, "min_ms": 27.049}, {"datetime": "2024-03-22T22:14:51.035220", "branch": "refs/heads/master", "average_ms": 34.5346, "max_ms": 40.042, "min_ms": 27.5}, {"datetime": "2024-03-22T22:33:17.685491", "branch": "refs/heads/master", "average_ms": 33.5377, "max_ms": 39.5, "min_ms": 27.587}, {"datetime": "2024-03-22T22:45:33.352704", "branch": "refs/heads/master", "average_ms": 36.1131, "max_ms": 42.431, "min_ms": 28.153}, {"datetime": "2024-03-22T23:08:44.879541", "branch": "refs/heads/master", "average_ms": 35.6584, "max_ms": 42.668, "min_ms": 30.103}, {"datetime": "2024-03-22T23:39:54.929700", "branch": "refs/heads/master", "average_ms": 30.4416, "max_ms": 38.893, "min_ms": 27.504}, {"datetime": "2024-03-22T23:45:06.411830", "branch": "refs/heads/master", "average_ms": 32.1552, "max_ms": 37.562, "min_ms": 25.292}, {"datetime": "2024-03-23T00:06:30.644150", "branch": "refs/heads/master", "average_ms": 35.4527, "max_ms": 45.253, "min_ms": 28.675}, {"datetime": "2024-03-23T01:24:11.042381", "branch": "refs/heads/master", "average_ms": 32.4204, "max_ms": 39.78, "min_ms": 27.44}, {"datetime": "2024-03-23T01:58:10.791724", "branch": "refs/heads/master", "average_ms": 33.5654, "max_ms": 40.056, "min_ms": 26.874}, {"datetime": "2024-03-23T02:41:21.482433", "branch": "refs/heads/master", "average_ms": 31.3107, "max_ms": 39.494, "min_ms": 27.634}, {"datetime": "2024-03-23T11:45:40.477664", "branch": "refs/heads/master", "average_ms": 35.146, "max_ms": 39.814, "min_ms": 27.34}, {"datetime": "2024-03-23T11:54:05.337220", "branch": "refs/heads/master", "average_ms": 33.8837, "max_ms": 41.126, "min_ms": 27.794}, {"datetime": "2024-03-23T20:27:16.648504", "branch": "refs/heads/master", "average_ms": 32.3805, "max_ms": 39.536, "min_ms": 26.602}, {"datetime": "2024-04-01T14:26:46.094235", "branch": "refs/heads/master", "average_ms": 33.7804, "max_ms": 39.643, "min_ms": 27.308}, {"datetime": "2024-04-02T14:04:20.627701", "branch": "refs/heads/master", "average_ms": 34.469, "max_ms": 40.481, "min_ms": 27.346}, {"datetime": "2024-04-04T21:50:56.409677", "branch": "refs/heads/master", "average_ms": 35.0665, "max_ms": 40.354, "min_ms": 28.15}, {"datetime": "2024-04-05T16:10:34.554051", "branch": "refs/heads/master", "average_ms": 33.0703, "max_ms": 38.776, "min_ms": 27.537}, {"datetime": "2024-04-07T15:40:27.938237", "branch": "refs/heads/master", "average_ms": 33.4506, "max_ms": 40.27, "min_ms": 28.203}, {"datetime": "2024-04-13T11:36:45.941728", "branch": "refs/heads/master", "average_ms": 32.3487, "max_ms": 39.359, "min_ms": 28.233}, {"datetime": "2024-04-15T11:52:30.591947", "branch": "refs/heads/master", "average_ms": 37.5277, "max_ms": 40.357, "min_ms": 28.669}, {"datetime": "2024-04-19T15:40:57.945431", "branch": "refs/heads/master", "average_ms": 31.3677, "max_ms": 39.723, "min_ms": 28.84}, {"datetime": "2024-04-19T15:48:47.375517", "branch": "refs/heads/master", "average_ms": 33.2032, "max_ms": 39.198, "min_ms": 28.799}, {"datetime": "2024-04-25T15:33:40.916141", "branch": "refs/heads/master", "average_ms": 36.219, "max_ms": 40.596, "min_ms": 28.917}, {"datetime": "2024-05-06T15:04:21.333701", "branch": "refs/heads/master", "average_ms": 34.2888, "max_ms": 39.944, "min_ms": 27.75}, {"datetime": "2024-05-06T15:07:45.623678", "branch": "refs/heads/master", "average_ms": 34.7666, "max_ms": 40.631, "min_ms": 29.032}, {"datetime": "2024-05-06T15:49:39.690967", "branch": "refs/heads/master", "average_ms": 33.934, "max_ms": 38.806, "min_ms": 26.811}, {"datetime": "2024-05-06T15:51:52.277428", "branch": "refs/heads/master", "average_ms": 33.3966, "max_ms": 38.652, "min_ms": 27.857}, {"datetime": "2024-05-06T16:37:21.289959", "branch": "refs/heads/master", "average_ms": 34.7084, "max_ms": 39.103, "min_ms": 27.937}, {"datetime": "2024-05-06T16:55:15.518422", "branch": "refs/heads/master", "average_ms": 34.8463, "max_ms": 43.839, "min_ms": 27.619}, {"datetime": "2024-05-06T17:04:47.494783", "branch": "refs/heads/master", "average_ms": 35.447, "max_ms": 40.013, "min_ms": 28.878}, {"datetime": "2024-05-06T17:22:00.018845", "branch": "refs/heads/master", "average_ms": 34.3325, "max_ms": 40.643, "min_ms": 27.287}, {"datetime": "2024-05-06T17:27:27.350795", "branch": "refs/heads/master", "average_ms": 34.9023, "max_ms": 39.603, "min_ms": 27.837}, {"datetime": "2024-05-06T17:32:03.875522", "branch": "refs/heads/master", "average_ms": 34.2636, "max_ms": 39.174, "min_ms": 28.106}, {"datetime": "2024-05-06T18:03:37.852789", "branch": "refs/heads/master", "average_ms": 34.1358, "max_ms": 41.104, "min_ms": 28.202}, {"datetime": "2024-05-06T18:56:33.324023", "branch": "refs/heads/master", "average_ms": 34.3114, "max_ms": 39.686, "min_ms": 27.151}, {"datetime": "2024-05-06T19:06:31.746639", "branch": "refs/heads/master", "average_ms": 35.705, "max_ms": 39.505, "min_ms": 28.361}, {"datetime": "2024-05-06T19:27:53.078274", "branch": "refs/heads/master", "average_ms": 35.271, "max_ms": 41.249, "min_ms": 28.131}, {"datetime": "2024-05-06T19:41:12.266323", "branch": "refs/heads/master", "average_ms": 33.7457, "max_ms": 40.065, "min_ms": 27.467}, {"datetime": "2024-05-06T19:48:19.736338", "branch": "refs/heads/master", "average_ms": 33.6965, "max_ms": 39.148, "min_ms": 28.364}, {"datetime": "2024-05-06T20:45:02.327511", "branch": "refs/heads/master", "average_ms": 38.532, "max_ms": 41.512, "min_ms": 29.426}, {"datetime": "2024-05-07T16:10:54.694525", "branch": "refs/heads/master", "average_ms": 34.9475, "max_ms": 39.879, "min_ms": 27.836}, {"datetime": "2024-05-12T14:17:42.756781", "branch": "refs/heads/master", "average_ms": 34.8594, "max_ms": 39.816, "min_ms": 28.135}, {"datetime": "2024-05-23T14:12:37.641232", "branch": "refs/heads/master", "average_ms": 29.5591, "max_ms": 31.146, "min_ms": 28.466}, {"datetime": "2024-05-27T13:59:01.229042", "branch": "refs/heads/master", "average_ms": 31.2834, "max_ms": 32.259, "min_ms": 30.336}, {"datetime": "2024-05-27T14:26:21.582727", "branch": "refs/heads/master", "average_ms": 29.1202, "max_ms": 30.283, "min_ms": 28.131}, {"datetime": "2024-06-15T18:00:33.302485", "branch": "refs/heads/master", "average_ms": 30.5311, "max_ms": 33.691, "min_ms": 26.877}, {"datetime": "2024-06-15T18:48:23.254225", "branch": "refs/heads/master", "average_ms": 29.5989, "max_ms": 31.858, "min_ms": 28.681}, {"datetime": "2024-06-26T23:47:02.787970", "branch": "refs/heads/master", "average_ms": 30.7616, "max_ms": 33.589, "min_ms": 28.56}, {"datetime": "2024-07-02T23:59:35.418547", "branch": "refs/heads/master", "average_ms": 31.3162, "max_ms": 33.098, "min_ms": 29.69}, {"datetime": "2024-07-03T00:25:21.619082", "branch": "refs/heads/master", "average_ms": 31.6174, "max_ms": 35.56, "min_ms": 30.153}, {"datetime": "2024-07-13T16:06:05.231900", "branch": "refs/heads/master", "average_ms": 30.7405, "max_ms": 32.673, "min_ms": 29.753}, {"datetime": "2024-08-03T03:24:16.706563", "branch": "refs/heads/master", "average_ms": 30.4129, "max_ms": 32.542, "min_ms": 28.749}, {"datetime": "2024-08-03T04:01:28.926156", "branch": "refs/heads/master", "average_ms": 31.7124, "max_ms": 32.229, "min_ms": 31.047}, {"datetime": "2024-09-05T12:52:05.781449", "branch": "refs/heads/master", "average_ms": 31.5054, "max_ms": 34.158, "min_ms": 30.544}, {"datetime": "2024-09-05T13:08:22.342991", "branch": "refs/heads/master", "average_ms": 30.8071, "max_ms": 31.526, "min_ms": 30.142}, {"datetime": "2024-09-05T13:28:57.278015", "branch": "refs/heads/master", "average_ms": 31.9382, "max_ms": 34.07, "min_ms": 29.592}, {"datetime": "2024-09-05T13:35:47.425098", "branch": "refs/heads/master", "average_ms": 30.3989, "max_ms": 31.765, "min_ms": 29.489}, {"datetime": "2024-09-24T00:05:05.221491", "branch": "refs/heads/master", "average_ms": 30.5758, "max_ms": 32.778, "min_ms": 29.611}, {"datetime": "2024-09-24T00:16:44.048015", "branch": "refs/heads/master", "average_ms": 29.5345, "max_ms": 30.515, "min_ms": 28.93}, {"datetime": "2024-09-24T00:38:52.670253", "branch": "refs/heads/master", "average_ms": 30.8897, "max_ms": 33.332, "min_ms": 28.89}, {"datetime": "2024-10-05T13:33:23.022405", "branch": "refs/heads/master", "average_ms": 30.7807, "max_ms": 31.6, "min_ms": 28.951}, {"datetime": "2024-10-09T20:13:09.452939", "branch": "refs/heads/master", "average_ms": 31.5009, "max_ms": 32.788, "min_ms": 29.597}, {"datetime": "2024-10-13T14:58:39.869815", "branch": "refs/heads/master", "average_ms": 32.6382, "max_ms": 41.127, "min_ms": 30.81}, {"datetime": "2024-10-14T22:58:09.802024", "branch": "refs/heads/master", "average_ms": 30.5792, "max_ms": 31.614, "min_ms": 29.725}, {"datetime": "2024-10-22T21:50:23.703513", "branch": "refs/heads/master", "average_ms": 30.3216, "max_ms": 31.0, "min_ms": 29.111}, {"datetime": "2024-10-27T11:11:20.422463", "branch": "refs/heads/master", "average_ms": 30.9591, "max_ms": 35.454, "min_ms": 28.708}, {"datetime": "2024-11-09T11:50:43.033874", "branch": "refs/heads/master", "average_ms": 31.941, "max_ms": 36.785, "min_ms": 29.808}, {"datetime": "2024-11-10T22:25:18.104167", "branch": "refs/heads/master", "average_ms": 30.7624, "max_ms": 32.502, "min_ms": 28.786}, {"datetime": "2024-11-12T15:51:07.743591", "branch": "refs/heads/master", "average_ms": 30.2908, "max_ms": 32.216, "min_ms": 28.475}, {"datetime": "2024-11-13T02:29:53.941794", "branch": "refs/heads/master", "average_ms": 30.7255, "max_ms": 31.641, "min_ms": 29.795}, {"datetime": "2024-11-22T15:18:59.165180", "branch": "refs/heads/master", "average_ms": 30.0573, "max_ms": 31.458, "min_ms": 28.931}, {"datetime": "2024-11-23T18:42:48.942745", "branch": "refs/heads/master", "average_ms": 31.1897, "max_ms": 34.249, "min_ms": 29.22}, {"datetime": "2024-12-16T13:52:13.140760", "branch": "refs/heads/master", "average_ms": 31.1378, "max_ms": 32.655, "min_ms": 29.025}, {"datetime": "2024-12-23T11:31:34.545036", "branch": "refs/heads/master", "average_ms": 32.1232, "max_ms": 34.943, "min_ms": 30.418}, {"datetime": "2024-12-31T18:12:08.531244", "branch": "refs/heads/master", "average_ms": 31.5087, "max_ms": 33.929, "min_ms": 29.809}, {"datetime": "2025-01-05T00:32:14.635596", "branch": "refs/heads/master", "average_ms": 31.4736, "max_ms": 34.509, "min_ms": 29.401}, {"datetime": "2025-01-11T02:55:16.937204", "branch": "refs/heads/master", "average_ms": 32.3235, "max_ms": 38.578, "min_ms": 29.878}, {"datetime": "2025-02-08T21:55:39.346341", "branch": "refs/heads/master", "average_ms": 31.1774, "max_ms": 33.464, "min_ms": 30.24}, {"datetime": "2025-02-14T13:20:12.710839", "branch": "refs/heads/master", "average_ms": 31.3293, "max_ms": 35.585, "min_ms": 29.065}, {"datetime": "2025-02-17T01:38:57.501070", "branch": "refs/heads/master", "average_ms": 31.5171, "max_ms": 33.829, "min_ms": 30.325}, {"datetime": "2025-02-21T23:01:05.012627", "branch": "refs/heads/master", "average_ms": 32.3201, "max_ms": 33.591, "min_ms": 30.726}, {"datetime": "2025-02-22T00:23:58.574860", "branch": "refs/heads/master", "average_ms": 33.9638, "max_ms": 36.595, "min_ms": 31.824}, {"datetime": "2025-02-22T23:11:27.274751", "branch": "refs/heads/master", "average_ms": 31.2949, "max_ms": 32.241, "min_ms": 29.207}, {"datetime": "2025-02-22T23:12:27.525126", "branch": "refs/heads/master", "average_ms": 31.0683, "max_ms": 32.512, "min_ms": 29.675}, {"datetime": "2025-02-23T14:50:40.570248", "branch": "refs/heads/master", "average_ms": 31.0914, "max_ms": 37.097, "min_ms": 29.359}, {"datetime": "2025-02-23T19:28:47.475585", "branch": "refs/heads/master", "average_ms": 30.9948, "max_ms": 33.257, "min_ms": 29.831}, {"datetime": "2025-02-27T02:01:06.688221", "branch": "refs/heads/master", "average_ms": 30.9458, "max_ms": 32.548, "min_ms": 29.762}, {"datetime": "2025-02-27T14:04:53.657432", "branch": "refs/heads/master", "average_ms": 31.4342, "max_ms": 33.704, "min_ms": 30.431}, {"datetime": "2025-02-27T16:23:31.473167", "branch": "refs/heads/master", "average_ms": 32.3233, "max_ms": 33.932, "min_ms": 30.799}, {"datetime": "2025-02-27T18:03:22.840099", "branch": "refs/heads/master", "average_ms": 32.773, "max_ms": 34.348, "min_ms": 31.18}, {"datetime": "2025-02-27T19:13:07.260872", "branch": "refs/heads/master", "average_ms": 31.6132, "max_ms": 33.02, "min_ms": 30.07}, {"datetime": "2025-02-27T19:30:18.692382", "branch": "refs/heads/master", "average_ms": 33.188, "max_ms": 39.448, "min_ms": 31.434}, {"datetime": "2025-02-27T19:50:32.750274", "branch": "refs/heads/master", "average_ms": 31.1491, "max_ms": 32.101, "min_ms": 30.347}]} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..ab5272b --- /dev/null +++ b/docs/index.html @@ -0,0 +1,86 @@ + + + + Neovimのベンチマーク結果 - yuma140902/dotfiles-public + + + + + + +

Neovimのベンチマーク結果

+

+ + ベンチマーク状況のバッジ + + + デプロイ状況のバッジ + +

+

+ リポジトリ: yuma140902/dotfiles-public
+ データ: https://yuma14.net/dotfiles-public/benchmarks.json
+

+
+ + + + diff --git a/dotfiles b/dotfiles deleted file mode 100755 index ca56d0e..0000000 --- a/dotfiles +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -cd "${0%/*}" - -if [ -z $PYTHON ]; then - if command -v python3 &> /dev/null; then - PYTHON=python3 - elif command -v python &> /dev/null; then - PYTHON=python - else - echo "Python not found" - exit 1 - fi -fi - -$PYTHON -m dotfileslib.main $* diff --git a/dotfiles.bat b/dotfiles.bat deleted file mode 100644 index a8f01c5..0000000 --- a/dotfiles.bat +++ /dev/null @@ -1,20 +0,0 @@ -@ECHO OFF -SETLOCAL ENABLEDELAYEDEXPANSION -CD /D "%~DP0" - -IF "%PYTHON%"=="" ( - WHERE python3 >NUL 2>NUL - IF !ERRORLEVEL! EQU 0 ( - SET PYTHON=python3 - ) ELSE ( - WHERE python >NUL 2>NUL - IF !ERRORLEVEL! EQU 0 ( - SET PYTHON=python - ) ELSE ( - ECHO Python not found - EXIT /b 1 - ) - ) -) - -%PYTHON% -m dotfileslib.main %* diff --git a/dotfileslib/__init__.py b/dotfileslib/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/dotfileslib/commands.py b/dotfileslib/commands.py deleted file mode 100644 index d1cb1ea..0000000 --- a/dotfileslib/commands.py +++ /dev/null @@ -1,77 +0,0 @@ -import pathlib -import sys - -from . import module - -def install(args): - allow_overwrite = args.allow_overwrite - modules = [] - if args.all: - modules = get_list_of_all_modules(pathlib.Path(args.path)) - else: - for name in args.module: - mod = module.create_module_info(pathlib.Path.cwd() / name) - if mod is not None: - modules.append(mod) - - all_ok = True - for mod in modules: - print("Installing " + mod.get_name()) - if not mod.install_files(allow_overwrite=allow_overwrite): - all_ok = False - - for mod in modules: - notice = mod.get_notice() - if notice is not None: - print("Message from " + mod.get_name() + ":") - print(mod.get_notice()) - - if not all_ok: - sys.exit(1) - - -def list(args): - modules = get_list_of_all_modules(pathlib.Path(args.path)) - for mod in modules: - print(module_to_oneline(mod)) - -def info(args): - cwd = pathlib.Path.cwd() - mod = module.create_module_info(cwd / args.module) - if mod is None: - print("not found") - sys.exit(1) - print_module(mod) - -def get_list_of_all_modules(root): - lst = [] - for dir in root.iterdir(): - module_info = module.create_module_info(dir) - if module_info is not None: - lst.append(module_info) - return lst - -def module_to_oneline(module_info): - name = module_info.get_name() - desc = module_info.get_description() - if desc is None: - return name - else: - return name + " - " + desc.replace("\r\n", " ").replace("\n", " ") - -def print_module(module_info): - name = module_info.get_name() - desc = module_info.get_description() - files = module_info.get_install_files() - notice = module_info.get_notice() - - print("-" * max(len(name), 10)) - print(name) - print("-" * max(len(name), 10)) - print(desc) - print("Files:") - for f in files: - print(f.dst + " -> " + f.src) - print("-" * max(len(name), 10)) - print(notice) - print("-" * max(len(name), 10)) diff --git a/dotfileslib/main.py b/dotfileslib/main.py deleted file mode 100644 index 82cc080..0000000 --- a/dotfileslib/main.py +++ /dev/null @@ -1,42 +0,0 @@ -import argparse -import sys - -from . import commands - -if __name__ == '__main__': - sys.path.append("./commands") - parser = argparse.ArgumentParser(prog="dotfiles") - parser.add_argument("-y", "--noconfirm", action="store_true", - help="ユーザーに入力を求めない") - parser.add_argument("-v", "--version", action="version", version='%(prog)s 0.1.0') - sub_parsers = parser.add_subparsers(title="Sub Commands", dest="subcmd") - - parser_install = sub_parsers.add_parser("install", help="モジュールをインストールする") - parser_install.add_argument("module", metavar="MODULE", nargs="*", - help="インストールするモジュールの名前") - parser_install.add_argument("-f", "--allow-overwrite", action="store_true", - help="設定ファイル等の上書きを許可する。上書きされたファイルは\"元のファイル名.日時.bak\"などの名前で残される") - parser_install.add_argument("-a", "--all", action="store_true", - help="すべてのモジュールをインストールする") - parser_install.add_argument("-p", "--path", default=".", - help="--allが指定されたときの探索パス. デフォルト: \".\"") - - parser_list = sub_parsers.add_parser("list", help="モジュールを一覧表示する") - parser_list.add_argument("-p", "--path", default=".", - help="--allが指定されたときの探索パス. デフォルト: \".\"") - - parser_info = sub_parsers.add_parser("info", help="モジュールの情報を表示する") - parser_info.add_argument("module", metavar="MODULE") - - args = parser.parse_args() - - - if args.subcmd == "install": - commands.install(args) - elif args.subcmd == "list": - commands.list(args) - elif args.subcmd == "info": - commands.info(args) - else: - parser.print_help() - sys.exit(1) diff --git a/dotfileslib/module.py b/dotfileslib/module.py deleted file mode 100644 index da01998..0000000 --- a/dotfileslib/module.py +++ /dev/null @@ -1,125 +0,0 @@ -import json -import platform -import pathlib -import os -import shutil -import datetime - -class ModuleInfo: - def __init__(self, dir_path): - self.dir_path = dir_path - self.manifest_json = (dir_path / "manifest.json").read_text(encoding="UTF-8") - self.manifest = json.loads(self.manifest_json) - - def get_name(self): - if "name" in self.manifest: - return self.manifest["name"] - return self.dir_path.name - - def get_description(self): - if "description" in self.manifest: - return self.manifest["description"] - return None - - def get_notice(self): - if "notice" in self.manifest: - return self.manifest["notice"] - return None - - def get_install_files(self): - if "files" not in self.manifest: - return [] - - files = [] - for f in self.manifest["files"]: - if type(f) == str: - files.append(FileInstallation(f, f)) - elif "src" in f and "dst" in f: - if "cond" not in f: - files.append(FileInstallation(f["src"], f["dst"])) - elif condition_matches(f["cond"]): - files.append(FileInstallation(f["src"], f["dst"])) - else: - print("ignore " + str(f) + "") - return files - - def install_files(self, allow_overwrite=False): - files = self.get_install_files() - all_ok = True - for f in files: - src = resolve_src_path(self.dir_path, f.src) - dst = resolve_dst_path(f.dst) - assert dst is not None - print(str(dst) + " -> " + str(src)) - if not make_symlink(src, dst, allow_overwrite): - all_ok = False - print("failed") - return all_ok - - -class FileInstallation: - def __init__(self, src, dst): - self.src = src - self.dst = dst - -def condition_matches(condition): - return eval(condition, {"platform": platform}) - -def resolve_src_path(module_dir_path, src): - return module_dir_path / src - -def make_symlink(src, dst, allow_overwrite=False): - if dst.exists() or dst.is_symlink(): # dst.is_symlink()はwindows対応 - if not allow_overwrite: - return False - if dst.is_symlink(): - shutil.copyfile(dst, get_bak_path(dst), follow_symlinks=False) - dst.unlink() - else: - shutil.move(dst, get_bak_path(dst)) - print("created backup file") - dst.parent.mkdir(parents=True, exist_ok=True) - dst.symlink_to(src, target_is_directory=src.is_dir()) - return True - -def get_bak_path(path): - name = path.name - name_bak = name + "." + datetime.datetime.now().strftime("%Y%m%d%M%S") + ".bak" - return path.parent / name_bak - -home_path = pathlib.Path.home() -if platform.system() == "Windows": - xdg_config_home = os.environ.get("XDG_CONFIG_HOME", os.environ["LOCALAPPDATA"]) - xdg_data_home = os.environ.get("XDG_DATA_HOME", os.environ["LOCALAPPDATA"]) - xdg_state_home = os.environ.get("XDG_STATE_HOME", os.environ["APPDATA"]) -else: - xdg_config_home = os.environ.get("XDG_CONFIG_HOME", "~/.config") - xdg_data_home = os.environ.get("XDG_DATA_HOME", "~/.local/share") - xdg_state_home = os.environ.get("XDG_STATE_HOME", "~/.local/state") -xdg_config_home_path = pathlib.Path(xdg_config_home).expanduser() -xdg_data_home_path = pathlib.Path(xdg_data_home).expanduser() -xdg_state_home_path = pathlib.Path(xdg_state_home).expanduser() - -def resolve_dst_path(dst): - if dst[0] != "$": - dst = "${HOME}/" + dst - if dst.startswith("${HOME}/"): - dst = dst.lstrip("${HOME}/") - return home_path / dst - elif dst.startswith("${XDG_CONFIG_HOME}/"): - dst = dst.lstrip("${XDG_CONFIG_HOME}/") - return xdg_config_home_path / dst - elif dst.startswith("${XDG_DATA_HOME}/"): - dst = dst.lstrip("${XDG_DATA_HOME}/") - return xdg_data_home_path / dst - elif dst.startswith("${XDG_STATE_HOME}/"): - dst = dst.lstrip("${XDG_STATE_HOME}/") - return xdg_state_home_path / dst - return None - - -def create_module_info(path): - if (path / "manifest.json").is_file(): - return ModuleInfo(path) - return None - diff --git a/git/.gitconfig.arch b/git/.gitconfig.arch deleted file mode 100644 index 5154d59..0000000 --- a/git/.gitconfig.arch +++ /dev/null @@ -1,19 +0,0 @@ -[include] - path = ".gitconfig.private" -[filter "lfs"] - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process - required = true -[core] - autoCRLF = false - editor = nvim -N - quotepath = false -[alias] - plog = log --pretty='format:%C(yellow)%h %C(green)%cd %C(reset)%s %C(red)%d %C(cyan)[%an]' --date=iso - glog = plog --all --graph - ignore = "!gi() { curl -sL https://www.gitignore.io/api/$@ ;}; gi" -[pull] - rebase = false - -# vim: ft=gitconfig ff=unix noexpandtab diff --git a/git/.gitconfig.ubuntu b/git/.gitconfig.ubuntu deleted file mode 100644 index 3da10f8..0000000 --- a/git/.gitconfig.ubuntu +++ /dev/null @@ -1,26 +0,0 @@ -[include] - path = ".gitconfig.private" -[filter "lfs"] - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process - required = true -[core] - autoCRLF = false - editor = nvim -N - quotepath = false -[alias] - plog = log --pretty='format:%C(yellow)%h %C(green)%cd %C(reset)%s %C(red)%d %C(cyan)[%an]' --date=iso - glog = plog --all --graph - ignore = "!gi() { curl -sL https://www.gitignore.io/api/$@ ;}; gi" -[difftool "sourcetree"] - cmd = '' \"$LOCAL\" \"$REMOTE\" -[mergetool "sourcetree"] - cmd = "'' " - trustExitCode = true -[pull] - rebase = false -[commit] - gpgsign = false - -# vim: ft=gitconfig ff=unix noexpandtab diff --git a/git/.gitconfig.windows b/git/.gitconfig.windows deleted file mode 100644 index 3da10f8..0000000 --- a/git/.gitconfig.windows +++ /dev/null @@ -1,26 +0,0 @@ -[include] - path = ".gitconfig.private" -[filter "lfs"] - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process - required = true -[core] - autoCRLF = false - editor = nvim -N - quotepath = false -[alias] - plog = log --pretty='format:%C(yellow)%h %C(green)%cd %C(reset)%s %C(red)%d %C(cyan)[%an]' --date=iso - glog = plog --all --graph - ignore = "!gi() { curl -sL https://www.gitignore.io/api/$@ ;}; gi" -[difftool "sourcetree"] - cmd = '' \"$LOCAL\" \"$REMOTE\" -[mergetool "sourcetree"] - cmd = "'' " - trustExitCode = true -[pull] - rebase = false -[commit] - gpgsign = false - -# vim: ft=gitconfig ff=unix noexpandtab diff --git a/git/manifest.json b/git/manifest.json deleted file mode 100644 index 962320a..0000000 --- a/git/manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "notice": "git-privateモジュールもインストールするか、~/.gitconfig.privateファイルを書いてください", - "files": [ - { - "cond": "platform.system() == 'Linux'", - "src": ".gitconfig.arch", - "dst": ".gitconfig" - }, - { - "cond": "platform.system() == 'Windows'", - "src": ".gitconfig.windows", - "dst": ".gitconfig" - } - ] -} diff --git a/goneovim/manifest.json b/goneovim/manifest.json deleted file mode 100644 index 162e59f..0000000 --- a/goneovim/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "files": [ - { - "src": "settings.toml", - "dst": ".goneovim/settings.toml" - } - ] -} diff --git a/goneovim/settings.toml b/goneovim/settings.toml deleted file mode 100644 index 5c092c4..0000000 --- a/goneovim/settings.toml +++ /dev/null @@ -1,47 +0,0 @@ -[Editor] -BorderlessWindow = true -Transparent = 1.0 -# RestoreWindowGeometry = true -IndentGuide = true -FontFamily = "HackGenNerd Console" -FontSize = 12 -ExtPopupmenu = true -# ExtMessages = true -# ExtTabline = true -# ExtCmdline = true -# ModeEnablingIME = ["insert", "cmdline_normal"] -# SmoothScroll = true -# FileOpenCmd = ":e" -IgnoreFirstMouseClickWhenAppInactivated = true - -[Cursor] -SmoothMove = true -Duration = 55 - -[Statusline] -Visible = true -ModeIndicatorType = "textLabel" - -[Tabline] -Visible = true -ShowIcon = true - -[Popupmenu] - -[ScrollBar] -Visible = true - -[MiniMap] -# Disable = false -Disable = true -Visible = true -Width = 80 - -[Markdown] -Disable = false -CodeHlStyle = "github" - -[SideBar] -Visible = false -Width = 200 -DropShadow = false diff --git a/i3/config b/i3/config deleted file mode 100644 index b89ed51..0000000 --- a/i3/config +++ /dev/null @@ -1,198 +0,0 @@ -# This file has been auto-generated by i3-config-wizard(1). -# It will not be overwritten, so edit it as you like. -# -# Should you change your keyboard layout some time, delete -# this file and re-run i3-config-wizard(1). -# - -# i3 config file (v4) -# -# Please see https://i3wm.org/docs/userguide.html for a complete reference! - -set $mod Mod4 - -# Font for window titles. Will also be used by the bar unless a different font -# is used in the bar {} block below. -font pango:monospace 8 - -# This font is widely installed, provides lots of unicode glyphs, right-to-left -# text rendering and scalability on retina/hidpi displays (thanks to pango). -#font pango:DejaVu Sans Mono 8 - -# Start XDG autostart .desktop files using dex. See also -# https://wiki.archlinux.org/index.php/XDG_Autostart -exec --no-startup-id dex --autostart --environment i3 - -# The combination of xss-lock, nm-applet and pactl is a popular choice, so -# they are included here as an example. Modify as you see fit. - -# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the -# screen before suspend. Use loginctl lock-session to lock your screen. -exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork - -# NetworkManager is the most popular way to manage wireless networks on Linux, -# and nm-applet is a desktop environment-independent system tray GUI for it. -exec --no-startup-id nm-applet - -exec --no-startup-id /usr/lib/pam_kwallet_init -exec --no-startup-id fcitx5 - -# Use pactl to adjust volume in PulseAudio. -set $refresh_i3status killall -SIGUSR1 i3status -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status -bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status - -# 5%明るく -bindsym XF86MonBrightnessUp exec light -A 5 -# 5%暗く -bindsym XF86MonBrightnessDown exec light -U 5 - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# move tiling windows via drag & drop by left-clicking into the title bar, -# or left-clicking anywhere into the window while holding the floating modifier. -tiling_drag modifier titlebar - -# start a terminal -bindsym $mod+Return exec i3-sensible-terminal - -# kill focused window -bindsym $mod+Shift+q kill - -# start dmenu (a program launcher) -bindsym $mod+d exec --no-startup-id dmenu_run -# A more modern dmenu replacement is rofi: -# bindcode $mod+40 exec "rofi -modi drun,run -show drun" -# There also is i3-dmenu-desktop which only displays applications shipping a -# .desktop file. It is a wrapper around dmenu, so you need that installed. -# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop - -# change focus -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right - -# alternatively, you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# move focused window -bindsym $mod+Shift+h move left -bindsym $mod+Shift+j move down -bindsym $mod+Shift+k move up -bindsym $mod+Shift+l move right - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# split in horizontal orientation -bindsym $mod+s split h - -# split in vertical orientation -bindsym $mod+v split v - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+t layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floatsemicoloning windows -bindsym $mod+space focus mode_toggle - -# focus the parent container -bindsym $mod+a focus parent - -# focus the child container -#bindsym $mod+d focus child - -# Define names for default workspaces for which we configure key bindings later on. -# We use variables to avoid repeating the names in multiple places. -set $ws1 "1" -set $ws2 "2" -set $ws3 "3" -set $ws4 "4" -set $ws5 "5" -set $ws6 "6" -set $ws7 "7" -set $ws8 "8" -set $ws9 "9" -set $ws10 "10" - -# switch to workspace -bindsym $mod+1 workspace number $ws1 -bindsym $mod+2 workspace number $ws2 -bindsym $mod+3 workspace number $ws3 -bindsym $mod+4 workspace number $ws4 -bindsym $mod+5 workspace number $ws5 -bindsym $mod+6 workspace number $ws6 -bindsym $mod+7 workspace number $ws7 -bindsym $mod+8 workspace number $ws8 -bindsym $mod+9 workspace number $ws9 -bindsym $mod+0 workspace number $ws10 - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace number $ws1 -bindsym $mod+Shift+2 move container to workspace number $ws2 -bindsym $mod+Shift+3 move container to workspace number $ws3 -bindsym $mod+Shift+4 move container to workspace number $ws4 -bindsym $mod+Shift+5 move container to workspace number $ws5 -bindsym $mod+Shift+6 move container to workspace number $ws6 -bindsym $mod+Shift+7 move container to workspace number $ws7 -bindsym $mod+Shift+8 move container to workspace number $ws8 -bindsym $mod+Shift+9 move container to workspace number $ws9 -bindsym $mod+Shift+0 move container to workspace number $ws10 - -# reload the configuration file -bindsym $mod+Shift+c reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r restart -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" - -# resize window (you can also use the mouse for that) -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym h resize shrink width 10 px or 10 ppt - bindsym j resize grow height 10 px or 10 ppt - bindsym k resize shrink height 10 px or 10 ppt - bindsym l resize grow width 10 px or 10 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape or $mod+r - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" -} - -bindsym $mod+r mode "resize" - -# Start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar { - status_command i3status -} diff --git a/i3/manifest.json b/i3/manifest.json deleted file mode 100644 index 6202137..0000000 --- a/i3/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "files": [ - { - "src": "config", - "dst": "${XDG_CONFIG_HOME}/i3/config" - } - ] -} diff --git a/neovim/.vsnip/tex.json b/neovim/.vsnip/tex.json deleted file mode 100644 index fbb96fd..0000000 --- a/neovim/.vsnip/tex.json +++ /dev/null @@ -1,187 +0,0 @@ -{ - "yuma.fig": { - "prefix": "fig", - "body": [ - "\\begin{figure}[htpb]", - " \\centering", - " \\includegraphics[width=${1:0.6}\\textwidth]{$2}", - " \\caption{$3}", - " \\label{fig:$4}", - "\\end{figure}$0" - ] - }, - "yuma.wrapfig": { - "prefix": "wrapfig", - "body": [ - "\\begin{wrapfigure}{${1|r,l|}}[0pt]{.5\\textwidth}", - " \\begin{center}", - " \\includegraphics[width=.5\\textwidth]{$2}", - " \\caption{$3}", - " \\label{fig:$4}", - " \\end{center}", - "\\end{wrapfigure}$0" - ] - }, - "yuma.tabfig2": { - "prefix": "tabfig2", - "body": [ - "\\begin{figure}[htpb]", - " \\begin{tabular}{cc}", - " \\begin{minipage}[t]{.45\\textwidth}", - " \\centering", - " \\includegraphics[width=1.0\\textwidth]{$3}", - " \\subcaption{$4}", - " \\label{fig:$2:$5}", - " \\end{minipage} &", - "", - " \\begin{minipage}[t]{.45\\textwidth}", - " \\centering", - " \\includegraphics[width=1.0\\textwidth]{$6}", - " \\subcaption{$7}", - " \\label{fig:$2:$8}", - " \\end{minipage}", - " \\end{tabular}", - " \\caption{$1}", - " \\label{fig:$2}", - "\\end{figure}$0" - ] - }, - "yuma.tabfig3": { - "prefix": "tabfig3", - "body": [ - "\\begin{figure}[htpb]", - " \\begin{tabular}{ccc}", - " \\begin{minipage}[t]{.3\\textwidth}", - " \\centering", - " \\includegraphics[width=1.0\\textwidth]{$3}", - " \\subcaption{$4}", - " \\label{fig:$2:$5}", - " \\end{minipage} &", - "", - " \\begin{minipage}[t]{.3\\textwidth}", - " \\centering", - " \\includegraphics[width=1.0\\textwidth]{$6}", - " \\subcaption{$7}", - " \\label{fig:$2:$8}", - " \\end{minipage} &", - "", - " \\begin{minipage}[t]{.3\\textwidth}", - " \\centering", - " \\includegraphics[width=1.0\\textwidth]{$9}", - " \\subcaption{$10}", - " \\label{fig:$2:$11}", - " \\end{minipage}", - " \\end{tabular}", - " \\caption{$1}", - " \\label{fig:$2}", - "\\end{figure}$0" - ] - }, - "表を追加": { - "prefix": [ - "tab", - "table" - ], - "body": [ - "\\begin{table}[htbp]", - "\t\\caption{$1}", - "\t\\label{tab:$2}", - "\t\\centering", - "\t\\begin{tabular}{$3}", - "\t\t\\hline", - "\t\t$4", - "\t\t\\hline", - "\t\t$0", - "\t\t\\hline", - "\t\\end{tabular}", - "\\end{table}" - ] - }, - "参考文献一覧": { - "prefix": [ - "nocite", - "citelist" - ], - "body": [ - "\\nocite*{}", - "\\bibliographystyle{junsrt}", - "\\bibliography{${1:Bib File Name}}" - ] - }, - "参考文献": { - "prefix": [ - "cite", - "reference", - "bib" - ], - "body": [ - "\\bibliographystyle{junsrt}", - "\\bibliography{${1:Bib File Name}}" - ] - }, - "documentclass": { - "prefix": [ - "doc", - "jsa" - ], - "body": [ - "\\documentclass[a4j, 10pt, uplatex, dvipdfmx]{jsarticle}" - ] - }, - "よく使うパッケージ": { - "prefix": [ - "use" - ], - "body": [ - "\\usepackage{graphicx}", - "\\usepackage{siunitx}", - "\\usepackage{amssymb, amsmath}", - "\\usepackage{url}", - "\\usepackage{wrapfig}" - ] - }, - "タスクを追加": { - "prefix": [ - "todo" - ], - "body": [ - "% TODO: $1" - ] - }, - "箇条書き": { - "prefix": "item", - "body": [ - "% 普通の箇条書き", - "\\begin{itemize}", - "\t\\item $0", - "\\end{itemize}" - ] - }, - "箇条書き(カスタム記号)": { - "prefix": "item_custom", - "body": [ - "% カスタム記号のの箇条書き", - "\\begin{itemize}", - "\t\\item[$1] $0", - "\\end{itemize" - ] - }, - "箇条書き(番号付き)": { - "prefix": "item_numbers", - "body": [ - "% 番号付き箇条書き", - "\\begin{enumerate}", - "\t\\item $0", - "\\end{enumerate}" - ] - }, - "箇条書き(見出し付き)": { - "prefix": "item_headings", - "body": [ - "% 見出し付き箇条書き", - "\\begin{description}", - "\t\\item[$1] $0", - "\\end{description}" - ] - } -} diff --git a/neovim/manifest.json b/neovim/manifest.json deleted file mode 100644 index 9b6f496..0000000 --- a/neovim/manifest.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "notice": "`:Lazy sync` to install plugins", - "files": [ - { - "src": "nvim", - "dst": "${XDG_CONFIG_HOME}/nvim" - }, - { - "src": ".vsnip/", - "dst": "${HOME}/.vsnip" - } - ] -} diff --git a/neovim/nvim/ftplugin/java.lua b/neovim/nvim/ftplugin/java.lua deleted file mode 100644 index 2fe0639..0000000 --- a/neovim/nvim/ftplugin/java.lua +++ /dev/null @@ -1,76 +0,0 @@ --- If you started neovim within `~/dev/xy/project-1` this would resolve to `project-1` -local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ':p:h:t') - -if vim.fn.has('win32') == 1 then - local workspace_dir = 'C:\\Users\\yuma1\\.cache\\jdtls-workspaces\\' .. project_name - local launcher_path = - 'C:\\Users\\yuma1\\AppData\\Local\\nvim-data\\mason\\packages\\jdtls\\plugins\\org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar' - local config_path = - 'C:\\Users\\yuma1\\AppData\\Local\\nvim-data\\mason\\packages\\jdtls\\config_win' - -else - local workspace_dir = '/home/yuma/.cache/jdtls-workspaces/' .. project_name - local launcher_path = - '/home/yuma/.local/share/nvim/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar' - local config_path = - '/home/yuma/.local/share/nvim/mason/packages/jdtls/config_linux' -end - - --- See `:help vim.lsp.start_client` for an overview of the supported `config` options. -local config = { - -- The command that starts the language server - -- See: https://github.com/eclipse/eclipse.jdt.ls#running-from-the-command-line - cmd = { - - 'java', -- or '/path/to/java17_or_newer/bin/java' - -- depends on if `java` is in your $PATH env variable and if it points to the right version. - - '-Declipse.application=org.eclipse.jdt.ls.core.id1', - '-Dosgi.bundles.defaultStartLevel=4', - '-Declipse.product=org.eclipse.jdt.ls.core.product', - '-Dlog.protocol=true', - '-Dlog.level=ALL', - '-Xmx1g', - '--add-modules=ALL-SYSTEM', - '--add-opens', 'java.base/java.util=ALL-UNNAMED', - '--add-opens', 'java.base/java.lang=ALL-UNNAMED', - - '-jar', - launcher_path, - -- Must point to the - -- eclipse.jdt.ls installation - - - '-configuration', config_path, - -- Must point to the - -- eclipse.jdt.ls installation - - - -- See `data directory configuration` section in the README - '-data', workspace_dir - }, - -- This is the default if not provided, you can remove it. Or adjust as needed. - -- One dedicated LSP server & client will be started per unique root_dir - root_dir = require('jdtls.setup').find_root({ '.git', 'mvnw', 'gradlew' }), - -- Here you can configure eclipse.jdt.ls specific settings - -- See https://github.com/eclipse/eclipse.jdt.ls/wiki/Running-the-JAVA-LS-server-from-the-command-line#initialize-request - -- for a list of options - settings = { - java = { - } - }, - -- Language server `initializationOptions` - -- You need to extend the `bundles` with paths to jar files - -- if you want to use additional eclipse.jdt.ls plugins. - -- - -- See https://github.com/mfussenegger/nvim-jdtls#java-debug-installation - -- - -- If you don't plan on using the debugger or other eclipse.jdt.ls plugins you can remove this - init_options = { - bundles = {} - }, -} --- This starts a new client & server, --- or attaches to an existing client & server depending on the `root_dir`. -require('jdtls').start_or_attach(config) diff --git a/neovim/nvim/ginit.vim b/neovim/nvim/ginit.vim deleted file mode 100644 index 486e1e9..0000000 --- a/neovim/nvim/ginit.vim +++ /dev/null @@ -1 +0,0 @@ -set autochdir diff --git a/neovim/nvim/init.lua b/neovim/nvim/init.lua deleted file mode 100644 index e5132a3..0000000 --- a/neovim/nvim/init.lua +++ /dev/null @@ -1,5 +0,0 @@ -require 'rc.disable_default_plugins' -require 'rc.base' -require 'rc.gui' -require 'rc.plugins' -require 'keymaps'.register_keymaps() diff --git a/neovim/nvim/lazy-lock.json b/neovim/nvim/lazy-lock.json deleted file mode 100644 index d5923b1..0000000 --- a/neovim/nvim/lazy-lock.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "aerial.nvim": { "branch": "master", "commit": "fc04a097d0b0e828dfd508f9b079774bd072431e" }, - "auto-session": { "branch": "main", "commit": "3eb26b949e1b90798e84926848551046e2eb0721" }, - "auto-split-direction.nvim": { "branch": "master", "commit": "f4e68b4121b5ea901f8664a9ca1c5cca5f96cab0" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, - "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, - "crates.nvim": { "branch": "main", "commit": "1dffccc0a95f656ebe00cacb4de282473430c5a1" }, - "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, - "friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" }, - "gitsigns.nvim": { "branch": "main", "commit": "d927caa075df63bf301d92f874efb72fd22fd3b4" }, - "jumpcursor.vim": { "branch": "main", "commit": "29669e27c0cbe65da8497c91585504bef846e255" }, - "lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" }, - "lexima.vim": { "branch": "master", "commit": "b1e1b1bde07c1efc97288c98c5912eaa644ee6e1" }, - "lightline.vim": { "branch": "master", "commit": "f11645cc6d37871244f2ea0ae972d3f6af9c8f73" }, - "linediff.vim": { "branch": "main", "commit": "3925a50a02b4b1e7958807676f93e06b53c66e27" }, - "lspsaga.nvim": { "branch": "main", "commit": "5faeec9f2508d2d49a66c0ac0d191096b4e3fa81" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" }, - "mason.nvim": { "branch": "main", "commit": "0942198fb9a998b6ccee36fb8dd7495eb8ba659c" }, - "neogen": { "branch": "main", "commit": "1dd0319ccf41b2498f45a3c7607f2ee325ffc6a0" }, - "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" }, - "nvim-ghost.nvim": { "branch": "main", "commit": "a1ca0b2dac59881066d7ac9373cf64d59ba29d6a" }, - "nvim-jdtls": { "branch": "master", "commit": "095dc490f362adc85be66dc14bd9665ddd94413b" }, - "nvim-lspconfig": { "branch": "master", "commit": "a27356f1ef9c11e1f459cc96a3fcac5c265e72d6" }, - "nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" }, - "nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" }, - "nvim-tree.lua": { "branch": "master", "commit": "5897b3622f033b1f3ea6adf8eb1c165e9f20554f" }, - "nvim-treesitter": { "branch": "master", "commit": "30604fd7dde5abcba7ca8f5761894dfa61febe51" }, - "nvim-web-devicons": { "branch": "master", "commit": "bc11ee2498de2310de5776477dd9dce65d03b464" }, - "oil.nvim": { "branch": "master", "commit": "ca2560cae8a680c424a338fbeca8f0ab84e9791d" }, - "onedark.nvim": { "branch": "master", "commit": "7bd3558c17045b95c961d28861c1b3bd9bdc992a" }, - "plenary.nvim": { "branch": "master", "commit": "0dbe561ae023f02c2fb772b879e905055b939ce3" }, - "rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" }, - "telescope-command-palette.nvim": { "branch": "master", "commit": "cf38d89446ff36d07191d32796eed6e38e5ce118" }, - "telescope-github.nvim": { "branch": "master", "commit": "ee95c509901c3357679e9f2f9eaac3561c811736" }, - "telescope-undo.nvim": { "branch": "main", "commit": "3dec002ea3e7952071d26fbb5d01e2038a58a554" }, - "telescope.nvim": { "branch": "0.1.x", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, - "todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" }, - "trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" }, - "twilight.nvim": { "branch": "main", "commit": "a4843e6e67092a1e6fa9666f02bf0ab59174c1df" }, - "vim-fugitive": { "branch": "master", "commit": "572c8510123cbde02e8a1dafcd376c98e1e13f43" }, - "vim-gitbranch": { "branch": "master", "commit": "1a8ba866f3eaf0194783b9f8573339d6ede8f1ed" }, - "vim-partedit": { "branch": "master", "commit": "5936e9bc04c8e3925489397079a6b0a862353d3a" }, - "vim-sandwich": { "branch": "master", "commit": "c5a2cc438ce6ea2005c556dc833732aa53cae21a" }, - "vim-vsnip": { "branch": "master", "commit": "7753ba9c10429c29d25abfd11b4c60b76718c438" }, - "vim-vsnip-integ": { "branch": "master", "commit": "1914e72cf3de70df7f5dde476cd299aba2440aef" }, - "which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" } -} \ No newline at end of file diff --git a/neovim/nvim/lua/command_palette.lua b/neovim/nvim/lua/command_palette.lua deleted file mode 100644 index d54cec6..0000000 --- a/neovim/nvim/lua/command_palette.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - table = { - { 'Buffer', - { 'すべて選択 (Select all)', ':call feedkeys("GVgg")' } - }, - { 'Session', - { 'セッションを復元 (Restore session)', ':SessionRestore' }, - { 'セッションを保存 (Save session)', ':SessionSave' }, - { 'セッションを削除 (Delete session)', - ':call feedkeys(":DisableAutoSave\\:SessionDelete\\")' }, - { 'セッションを削除して終了 (Delete session and quit)', - ':call feedkeys(":DisableAutoSave\\:SessionDelete\\:qa\\")' } - } - } -} diff --git a/neovim/nvim/lua/keymaps.lua b/neovim/nvim/lua/keymaps.lua deleted file mode 100644 index 64002f0..0000000 --- a/neovim/nvim/lua/keymaps.lua +++ /dev/null @@ -1,285 +0,0 @@ -local use_lspsaga_keymaps = true - -local map = require 'rc/lib'.map - -local function register_keymaps() - require 'which-key'.register({ - l = { name = 'trouble.nvim(画面下のリスト開閉)' }, - x = { - name = 'IDE-like Neovim(エイリアス)', - g = { name = '移動系' }, - v = { name = '表示系' }, - e = { name = '編集系' } - }, - h = { - name = 'gitsigns', - t = { name = 'トグル系' } - }, - g = { - name = 'fugitive' - }, - f = { - name = 'Telescope(ファジーファインダ)', - g = { - name = 'Git関係', - h = { name = 'GitHub関係 でブラウザで開く' } - }, - x = { name = 'EXTRA' } - }, - c = { - name = 'crates.nvim' - } - }, { prefix = '' }) - - require 'which-key'.register({ - t = { name = "ターミナル" } - }) - - -- バニラ - map('n', '[b', 'bprev', '前のバッファ') - map('n', ']b', 'bnext', '次のバッファ') - map('n', '', 'bp|bd #', 'バッファを閉じる(ウィンドウを閉じない)') -- https://stackoverflow.com/questions/4465095/how-to-delete-a-buffer-in-vim-without-losing-the-split-window - - -- タブ - map('n', '', 'tabprev') - map('n', '', 'tabnext') - - -- バニラ - ターミナル - map('n', 'tn', 'terminal', 'ターミナルを開く') - map('n', 'tt', 'tabnewterminalstartinsert', 'ターミナルを新規タブで開く') - map('n', 'tj', 'belowright newterminalstartinsert', 'ターミナルを下に開く') - map('n', 'tl', 'vlterminalstartinsert', 'ターミナルを左に開く') - - map('t', '', 'tabprev') - map('t', '', 'tabnext') - - map('t', '', '', 'ターミナルノーマルモード') - map('t', 'n', 'new') - map('t', '', 'new') - map('t', 'q', 'quit') - map('t', '', 'quit') - map('t', 'c', 'close') - map('t', 'o', 'only') - map('t', '', 'only') - map('t', '', 'wincmd j') - map('t', '', 'wincmd j') - map('t', 'j', 'wincmd j') - map('t', '', 'wincmd k') - map('t', '', 'wincmd k') - map('t', 'k', 'wincmd k') - map('t', '', 'wincmd h') - map('t', '', 'wincmd h') - map('t', '', 'wincmd h') - map('t', 'h', 'wincmd h') - map('t', '', 'wincmd l') - map('t', '', 'wincmd l') - map('t', 'l', 'wincmd l') - map('t', 'w', 'wincmd w') - map('t', '', 'wincmd w') - map('t', 'W', 'wincmd W') - map('t', 't', 'wincmd t') - map('t', '', 'wincmd t') - map('t', 'b', 'wincmd b') - map('t', '', 'wincmd b') - map('t', 'p', 'wincmd p') - map('t', '', 'wincmd p') - map('t', 'P', 'wincmd P') - map('t', 'r', 'wincmd r') - map('t', '', 'wincmd r') - map('t', 'R', 'wincmd R') - map('t', 'x', 'wincmd x') - map('t', '', 'wincmd x') - map('t', 'K', 'wincmd K') - map('t', 'J', 'wincmd J') - map('t', 'H', 'wincmd H') - map('t', 'L', 'wincmd L') - map('t', 'T', 'wincmd T') - map('t', '=', 'wincmd =') - map('t', '-', 'wincmd -') - map('t', '+', 'wincmd +') - map('t', 'z', 'pclose') - map('t', '', 'pclose') - - -- LSP関係 - map('n', 'gD', vim.lsp.buf.declaration, '[LSP] 宣言へ移動') - map('n', 'gd', vim.lsp.buf.definition, '[LSP] 定義へ移動') - map('n', 'gi', vim.lsp.buf.implementation, '[LSP] 実装へ移動') - map('n', 'D', vim.lsp.buf.type_definition, '変数の型の定義へ移動') - map('n', 'xgD', vim.lsp.buf.declaration, '宣言へ移動') - map('n', 'xgd', vim.lsp.buf.definition, '定義へ移動') - map('n', 'xgi', vim.lsp.buf.implementation, '実装へ移動') - - map('n', 'o', function() vim.lsp.buf.format { async = true } end, 'コードフォーマットする') - map('n', 'xef', function() vim.lsp.buf.format { async = true } end, 'コードフォーマットする') - if use_lspsaga_keymaps then - map('n', 'gr', 'Lspsaga lsp_finder', '[LSP] 参照へ移動') - map('n', 'K', 'Lspsaga hover_doc', 'ドキュメント表示') - map('n', '', 'Lspsaga signature_help', 'シグネチャを表示') - map('n', 'r', 'Lspsaga rename', 'リネームする') - map('n', 'a', 'Lspsaga code_action', 'コードアクションを表示') - map('x', 'a', 'Lspsaga range_code_action', 'コードアクションを表示') - map('n', 'xgr', 'Lspsaga lsp_finder', '参照へ移動') - map('n', 'xvk', 'Lspsaga hover_doc', 'ドキュメント表示') - map('n', 'xvs', 'Lspsaga signature_help', 'シグネチャを表示') - map('n', 'xer', 'Lspsaga rename', 'リネームする') - map('n', 'xva', 'Lspsaga code_action', 'コードアクションを表示') - map('x', 'xva', 'Lspsaga range_code_action', 'コードアクションを表示') - else - map('n', 'gr', vim.lsp.buf.references, '[LSP] 参照へ移動') - map('n', 'K', vim.lsp.buf.hover, 'ドキュメント表示') - map('n', '', vim.lsp.buf.signature_help, 'シグネチャを表示') - map('n', 'r', vim.lsp.buf.rename, 'リネームする') - map('n', 'a', vim.lsp.buf.code_action, 'コードアクションを表示') - map('n', 'xgr', vim.lsp.buf.references, '参照へ移動') - map('n', 'xvk', vim.lsp.buf.hover, 'ドキュメント表示') - map('n', 'xvs', vim.lsp.buf.signature_help, 'シグネチャを表示') - map('n', 'xer', vim.lsp.buf.rename, 'リネームする') - map('n', 'xva', vim.lsp.buf.code_action, 'コードアクションを表示') - end - - -- 診断関係 - -- :h vim.diagnostic.* - if use_lspsaga_keymaps then - map('n', 'd', 'Lspsaga show_line_diagnostics', '診断(エラーメッセージ等)をフロート表示') - map('n', '[d', 'Lspsaga diagnostic_jump_prev', '前の診断へ') - map('n', ']d', 'Lspsaga diagnostic_jump_next', '次の診断へ') - map('n', 'xve', 'Lspsaga show_line_diagnostics', '診断(エラーメッセージ等)をフロート表示') - map('n', 'xgD', 'Lspsaga diagnostic_jump_prev', '前の診断へ') - map('n', 'xgd', 'Lspsaga diagnostic_jump_next', '次の診断へ') - else - map('n', 'd', vim.diagnostic.open_float, '診断(エラーメッセージ等)をフロート表示') - map('n', '[d', vim.diagnostic.goto_prev, '前の診断へ') - map('n', ']d', vim.diagnostic.goto_next, '次の診断へ') - map('n', 'xve', vim.diagnostic.open_float, '診断(エラーメッセージ等)をフロート表示') - map('n', 'xgD', vim.diagnostic.goto_prev, '前の診断へ') - map('n', 'xgd', vim.diagnostic.goto_next, '次の診断へ') - end - - -- trouble.nvim - map('n', 'lx', 'TroubleToggle', 'トグル'); - map('n', '', 'TroubleToggle', 'トグル'); - map('n', 'ld', 'TroubleToggle document_diagnostics', '現在のファイルの診断情報'); - map('n', 'lw', 'TroubleToggle workspace_diagnostics', 'プロジェクト全体の診断情報'); - map('n', 'll', 'TroubleToggle loclist', 'loclist'); - map('n', 'lq', 'TroubleToggle quickfix', 'QuickFix'); - map('n', 'xvd', 'TroubleToggle document_diagnostics', '現在のファイルの診断情報'); - map('n', 'xvw', 'TroubleToggle workspace_diagnostics', 'プロジェクト全体の診断情報'); - - -- todo-comments.nvim - map('n', 'lt', 'TodoTrouble', 'TODOコメント'); - map('n', 'ft', 'TodoTelescope', 'TODOコメント'); - map('n', '[t', function() require 'todo-comments'.jump_next() end, '次のTODOコメントへ'); - map('n', ']t', function() require 'todo-comments'.jump_prev() end, '前のTODOコメントへ'); - map('n', 'xvt', 'TodoTrouble', 'TODOコメント'); - map('n', 'xgt', function() require 'todo-comments'.jump_next() end, '次のTODOコメントへ'); - map('n', 'xgT', function() require 'todo-comments'.jump_prev() end, '前のTODOコメントへ'); - - -- aerial - map('n', 'm', 'AerialOpen', 'Aerialを開く') - map('n', '', 'AerialOpen', 'Aerialを開く') - map('n', ']]', 'AerialNext', 'AerialNext') - map('n', '[[', 'AerialPrev', 'AerialPrev') - map('n', '{', 'AerialPrev', 'AerialNext') - map('n', '}', 'AerialNext', 'AerialPrev') - - -- jujmpcursor.vim - map('n', '[j', '(jumpcursor-jump)', 'jumpcursor.vimで移動') - - -- Gitsigns - -- Navigation - map('n', ']h', function() - if vim.wo.diff then return ']h' end - vim.schedule(function() require 'gitsigns'.next_hunk() end) - return '' - end, - '次のHunkへ', - { expr = true }) - map('n', '[h', function() - if vim.wo.diff then return '[h' end - vim.schedule(function() require 'gitsigns'.prev_hunk() end) - return '' - end, - '前のHunkへ', - { expr = true }) - -- Actions - map('n', 'hh', function() - require 'gitsigns' - vim.notify('Gitsigns Loaded', 'info', { - title = 'Plugin Loading' - }) - end, 'Gitsignsを読み込む') - map('n', 'hs', function() require 'gitsigns'.stage_hunk() end, 'Hunkをステージ') - map('n', 'hr', function() require 'gitsigns'.reset_hunk() end, 'Hunkをリセット') - map('v', 'hs', function() - require 'gitsigns'.stage_hunk { - vim.fn.line("."), vim.fn.line("v") } - end, '選択範囲をステージ') - map('v', 'hr', function() - require 'gitsigns'.reset_hunk { vim.fn.line("."), vim.fn.line("v") } - end, '選択範囲をリセット') - map('n', 'hS', function() require 'gitsigns'.stage_buffer() end, 'バッファ全体をステージ') - map('n', 'hu', function() require 'gitsigns'.undo_stage_hunk() end, 'ステージを取り消す') - map('n', 'hR', function() require 'gitsigns'.reset_buffer() end, 'バッファ全体をリセット') - map('n', 'hP', function() require 'gitsigns'.preview_hunk() end, 'Hunkをプレビュー(ポップアップ)') - map('n', 'hp', function() require 'gitsigns'.preview_hunk_inline() end, 'Hunkをプレビュー') - map('n', 'hb', function() require 'gitsigns'.blame_line { full = true } end, 'この行をblame') - map('n', 'htb', function() require 'gitsigns'.toggle_current_line_blame() end, '行blameをトグル') - map('n', 'hd', function() require 'gitsigns'.diffthis() end, 'vimdiff(diffthis)(????)') - map('n', 'hD', function() require 'gitsigns'.diffthis('~') end) - map('n', 'htd', function() require 'gitsigns'.toggle_deleted() end, 'Toggle Deleted') - map('n', 'lh', function() require 'gitsigns'.setqflist('all') end, '未ステージのHunkの一覧') - -- Text object - map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk') - - -- Fugitive - map('n', 'gg', 'GitT', 'git status') - map('n', 'gc', 'Git commit', 'git commit') - - -- NvimTree - map('n', 't', 'NvimTreeToggle', 'NvimTreeをトグル') - map('n', '', 'NvimTreeToggle', 'NvimTreeをトグル') - - -- vsnipで挿入されたスニペットのプレースホルダ間を移動するキーマップ - vim.cmd([[ - " Jump forward or backward - imap vsnip#jumpable(1) ? "(vsnip-jump-next)" : "" - smap vsnip#jumpable(1) ? "(vsnip-jump-next)" : "" - imap vsnip#jumpable(-1) ? "(vsnip-jump-prev)" : "" - smap vsnip#jumpable(-1) ? "(vsnip-jump-prev)" : "" -]]) - - -- telescope - map('n', 'fd', function() require 'telescope.builtin'.find_files() end, 'ファイル') - map('n', 'ff', 'Telescope find_files hidden=true', 'ファイル(すべて)') - map('n', 'fr', function() require 'telescope.builtin'.live_grep() end, 'Live grep') - map('n', 'b', 'Telescope buffers initial_mode=normal', 'バッファ選択') - map('n', '', 'Telescope buffers initial_mode=normal', 'バッファ選択') - map('n', 'fb', function() require 'telescope.builtin'.buffers() end, 'バッファ') - map('n', 'fh', function() require 'telescope.builtin'.help_tags() end, 'ヘルプファイル') - map('n', 'fc', function() require 'telescope.builtin'.commands() end, 'コマンド') - map('n', 'fl', function() require 'telescope.builtin'.current_buffer_fuzzy_find() end, 'カレントバッファ') - map('n', 'fo', function() require 'telescope.builtin'.oldfiles({ only_cwd = true }) end, '最近のファイル(カレントディレクトリ)') - map('n', 'fO', function() require 'telescope.builtin'.oldfiles({ only_cwd = false }) end, '最近のファイル(全部)') - map('n', 'fu', 'Telescope undo', '履歴(Undo)') - map('n', 'fp', 'Telescope command_palette', 'コマンドパレット') - map('n', 'fn', 'Telescope notify initial_mode=normal', '通知履歴') - map('n', '', 'Telescope command_palette', 'コマンドパレット') - map('n', 'fghi', 'Telescope gh issues', 'GitHub Issues') - map('n', 'fghr', 'Telescope gh pull_request', 'GitHub PR プルリクエスト : Show modified files') - map('n', 'fghg', 'Telescope gh gist', 'GitHub Gist : New') - map('n', 'fghw', 'Telescope gh run', 'GitHub Workflows') - map('n', 'fgb', function() require 'telescope.builtin'.git_bcommits() end, 'このファイルのコミット') - map('n', 'fgc', function() require 'telescope.builtin'.git_commits() end, 'コミット') - map('n', 'fgB', function() require 'telescope.builtin'.git_branches() end, 'ブランチ') - map('n', 'fxo', function() require 'telescope.builtin'.vim_options() end, 'Vimオプション') - map('n', 'fxa', function() require 'telescope.builtin'.autocommands() end, 'auto command') - map('n', 'fxk', function() require 'telescope.builtin'.keymaps() end, 'キーマップ') - map('n', 'fxp', function() require 'telescope.builtin'.pickers() end, 'Pickers') - - -- auto-split-direction - map('n', 'a', 'SplitAutoDirection', 'いい感じに分割') -end - -return { - register_keymaps = register_keymaps -} diff --git a/neovim/nvim/lua/lsp.lua b/neovim/nvim/lua/lsp.lua deleted file mode 100644 index 46e3e5c..0000000 --- a/neovim/nvim/lua/lsp.lua +++ /dev/null @@ -1,98 +0,0 @@ -local function setup_lsp() - require 'mason'.setup() - local mason_lspconfig = require 'mason-lspconfig' - local lspconfig = require 'lspconfig' - mason_lspconfig.setup { - ensure_installed = {} - } - - local capabilities = require 'cmp_nvim_lsp'.default_capabilities() - - local on_attach = function(client, bufnr) - -- :h lspconfig-keybindings - -- :h vim.lsp.* - -- - end - - -- 保存時にLSPの機能を使ってフォーマットする - vim.api.nvim_create_autocmd('BufWritePre', { - group = vim.api.nvim_create_augroup('format_on_save', { clear = true }), - pattern = '*', - callback = function() - if not vim.b.no_format_on_save then - vim.lsp.buf.format { async = false } - end - end - }) - - -- 一部のfiletypeでは保存時の自動フォーマットを行わない - vim.api.nvim_create_autocmd('FileType', { - group = vim.api.nvim_create_augroup('disable_format_on_save', { clear = true }), - -- filetypeをカンマ区切りで指定する - -- filetypeはバッファを開いた状態で:set ftで確認できる - -- tex: texlabのバグ?により、フォーマットするたびにファイル末尾に改行が追加されてしまうので解消されるまで無効化 TODO: - pattern = 'tex', - callback = function() - vim.b.no_format_on_save = true - end - }) - - -- :h mason-lspconfig-automatic-server-setup - mason_lspconfig.setup_handlers { - function(server_name) - lspconfig[server_name].setup { - on_attach = on_attach, - capabilities = capabilities, - } - end, - ['rust_analyzer'] = function() - require 'rust-tools'.setup { - capabilities = capabilities, - server = { - on_attach = function(client, bufnr) - on_attach(client, bufnr) - -- Hover actions - -- 代わりにlspsagaを使う - -- vim.keymap.set('n', '', require'rust-tools'.hover_actions.hover_actions, { buffer = bufnr }) - -- Code action groups - -- 代わりにlspsagaを使う - -- vim.keymap.set('n', 'a', require'rust-tools'.code_action_group.code_action_group, { buffer = bufnr }) - end, - }, - } - end, - ['lua_ls'] = function() - lspconfig.lua_ls.setup { - on_attach = on_attach, - capabilities = capabilities, - settings = { - Lua = { - diagnostics = { - globals = { 'vim' } - } - } - } - } - end, - ['denols'] = function() - lspconfig.denols.setup { - on_attach = on_attach, - capabilities = capabilities, - root_dir = lspconfig.util.root_pattern('deno.json', 'deno.jsonc'), - single_file_support = false, - } - end, - ['tsserver'] = function() - lspconfig.tsserver.setup { - on_attach = on_attach, - capabilities = capabilities, - root_dir = lspconfig.util.root_pattern('package.json'), - single_file_support = false, - } - end, - } -end - -return { - setup_lsp = setup_lsp -} diff --git a/neovim/nvim/lua/pl/README.txt b/neovim/nvim/lua/pl/README.txt deleted file mode 100644 index 1fc18eb..0000000 --- a/neovim/nvim/lua/pl/README.txt +++ /dev/null @@ -1 +0,0 @@ -プラグインの設定 diff --git a/neovim/nvim/lua/pl/auto-session.lua b/neovim/nvim/lua/pl/auto-session.lua deleted file mode 100644 index a4a2d3f..0000000 --- a/neovim/nvim/lua/pl/auto-session.lua +++ /dev/null @@ -1,11 +0,0 @@ -local M = {} - -function M.config() - require 'auto-session'.setup { - log_level = 'error', -- デフォルトはinfo。うるさかったらerrorにすればよい - auto_save_enabled = not vim.g.neovide, - auto_restore_enabled = not vim.g.neovide, - } -end - -return M diff --git a/neovim/nvim/lua/pl/auto-split-direction.lua b/neovim/nvim/lua/pl/auto-split-direction.lua deleted file mode 100644 index 27194c5..0000000 --- a/neovim/nvim/lua/pl/auto-split-direction.lua +++ /dev/null @@ -1,10 +0,0 @@ -local M = {} - -function M.config() - require 'auto-split-direction'.setup { - debug = false, - ratio = 3.0 - } -end - -return M diff --git a/neovim/nvim/lua/pl/crates.lua b/neovim/nvim/lua/pl/crates.lua deleted file mode 100644 index 750ee74..0000000 --- a/neovim/nvim/lua/pl/crates.lua +++ /dev/null @@ -1,43 +0,0 @@ -local M = {} - -function M.config() - require 'crates'.setup() - - -- nvim-cmpソースの追加 - -- TODO: 機能していない気がする - vim.api.nvim_create_autocmd("BufRead", { - group = vim.api.nvim_create_augroup("CmpSourceCargo", { clear = true }), - pattern = "Cargo.toml", - callback = function() - require 'cmp'.setup.buffer({ sources = { { name = "crates" } } }) - end, - }) - - -- キーマップの追加 - local crates = require 'crates' - local map = require 'rc.lib'.map - - map('n', 'ct', crates.toggle, 'Toggle') - map('n', 'cr', crates.reload, 'Reload') - - map('n', 'cv', crates.show_versions_popup, 'Show versions popup') - map('n', 'cf', crates.show_features_popup, 'Show features popup') - map('n', 'cd', crates.show_dependencies_popup, 'Show dependencies popup') - - map('n', 'cu', crates.update_crate, 'Update crate') - map('v', 'cu', crates.update_crates, 'Update crates') - map('n', 'ca', crates.update_all_crates, 'Update ALL crates') - map('n', 'cU', crates.upgrade_crate, 'Upgrade crate') - map('v', 'cU', crates.upgrade_crates, 'Upgrade crates') - map('n', 'cA', crates.upgrade_all_crates, 'Upgrade ALL crates') - - --vim.keymap.set('n', 'ce', crates.expand_p desc =lain_crate_to_inline_table, {silent = true}) - --vim.keymap.set('n', 'cE', crates.extract_crate_into_table, {silent = true}) - - map('n', 'cH', crates.open_homepage, 'Open homepage') - map('n', 'cR', crates.open_repository, 'Open repo') - map('n', 'cD', crates.open_documentation, 'Open doc') - map('n', 'cC', crates.open_crates_io, 'Open crates.io') -end - -return M diff --git a/neovim/nvim/lua/pl/fidget.lua b/neovim/nvim/lua/pl/fidget.lua deleted file mode 100644 index 3c437ae..0000000 --- a/neovim/nvim/lua/pl/fidget.lua +++ /dev/null @@ -1,10 +0,0 @@ -local M = {} - -function M.config() - require 'fidget'.setup { - text = { spinner = 'dots' }, - window = { blend = 0, border = 'none' } - } -end - -return M diff --git a/neovim/nvim/lua/pl/gitsigns.lua b/neovim/nvim/lua/pl/gitsigns.lua deleted file mode 100644 index 4bd737d..0000000 --- a/neovim/nvim/lua/pl/gitsigns.lua +++ /dev/null @@ -1,9 +0,0 @@ -local M = {} - -function M.config() - require 'gitsigns'.setup { - trouble = true, - } -end - -return M diff --git a/neovim/nvim/lua/pl/lexima.lua b/neovim/nvim/lua/pl/lexima.lua deleted file mode 100644 index 65fab38..0000000 --- a/neovim/nvim/lua/pl/lexima.lua +++ /dev/null @@ -1,16 +0,0 @@ -local M = {} - -function M.init() - vim.g.lexima_enable_basic_rules = 1 - vim.g.lexima_enable_newline_rules = 1 - vim.g.lexima_enable_endwise_rules = 1 -end - -function M.config() - vim.cmd "call lexima#add_rule({'filetype': 'rust', 'char': '''', 'at': '&\\%#', 'input': ''''})" - vim.cmd "call lexima#add_rule({'filetype': 'latex', 'char': '$', 'input_after': '$'})" - vim.cmd "call lexima#add_rule({'filetype': 'latex', 'char': '$', 'at': '\\%#\\$', 'leave': 1})" - vim.cmd "call lexima#add_rule({'filetype': 'latex', 'char': '', 'at': '\\$\\%#\\$', 'delete': 1})" -end - -return M diff --git a/neovim/nvim/lua/pl/lightline.lua b/neovim/nvim/lua/pl/lightline.lua deleted file mode 100644 index 60f1623..0000000 --- a/neovim/nvim/lua/pl/lightline.lua +++ /dev/null @@ -1,17 +0,0 @@ -local M = {} - -function M.init() - vim.g.lightline = { - colorscheme = 'one', - active = { - left = { { 'mode', 'paste' }, - { 'gitbranch', 'readonly', 'filename', 'modified' } } - }, - component_function = { - gitbranch = 'gitbranch#name' - }, - } - vim.o.showmode = false -end - -return M diff --git a/neovim/nvim/lua/pl/neogen.lua b/neovim/nvim/lua/pl/neogen.lua deleted file mode 100644 index 50eabd4..0000000 --- a/neovim/nvim/lua/pl/neogen.lua +++ /dev/null @@ -1,7 +0,0 @@ -local M = {} - -function M.config() - require 'neogen'.setup { snippet_engine = 'vsnip' } -end - -return M diff --git a/neovim/nvim/lua/pl/nvim-cmp.lua b/neovim/nvim/lua/pl/nvim-cmp.lua deleted file mode 100644 index 447ae7f..0000000 --- a/neovim/nvim/lua/pl/nvim-cmp.lua +++ /dev/null @@ -1,103 +0,0 @@ -local M = {} - -function M.init() - vim.cmd 'set completeopt=menu,menuone,noselect' -end - -function M.config() - local cmp = require 'cmp' - - local has_words_before = function() - unpack = unpack or table.unpack - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) - return col ~= 0 and - vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match( - '%s') == - nil - end - - local feedkey = function(key, mode) - vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, - true) - end - - cmp.setup { - snippet = { - -- REQUIRED - you must specify a snippet engine - expand = function(args) - vim.fn['vsnip#anonymous'](args.body) - end, - }, - window = { - --completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - mapping = { - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item { behavior = cmp.SelectBehavior - .Select } - elseif has_words_before() then - cmp.confirm { select = false } - else - fallback() -- The fallback function sends a already mapped key. In this case, it's probably ``. - end - end, { 'i', 's' }), - [''] = cmp.mapping(function() - if cmp.visible() then - cmp.select_prev_item { behavior = cmp.SelectBehavior - .Select } - elseif vim.fn['vsnip#jumpable'](-1) == 1 then - feedkey('(vsnip-jump-prev)', '') - end - end, { 'i', 's' }), - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.confirm { select = false }, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - [''] = cmp.mapping.abort(), - }, - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - { name = 'nvim_lsp_signature_help' }, - { name = 'vsnip' }, - { name = 'path' }, - }, { - { - name = 'buffer', - option = { - get_bufnrs = function() - return vim.api.nvim_list_bufs() - end, - keyword_length = 3 - } - }, - }) - } - - cmp.setup.cmdline({ '/', '?' }, { - mapping = cmp.mapping.preset.cmdline(), - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - sources = { - { name = 'buffer' } - } - }) - - cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline', keyword_length = 3 } - }) - }) -end - -return M diff --git a/neovim/nvim/lua/pl/nvim-ghost.lua b/neovim/nvim/lua/pl/nvim-ghost.lua deleted file mode 100644 index c9a8245..0000000 --- a/neovim/nvim/lua/pl/nvim-ghost.lua +++ /dev/null @@ -1,7 +0,0 @@ -local M = {} - -function M.init() - vim.g.nvim_ghost_autostart = 0 -end - -return M diff --git a/neovim/nvim/lua/pl/nvim-lspconfig.lua b/neovim/nvim/lua/pl/nvim-lspconfig.lua deleted file mode 100644 index 4b489e3..0000000 --- a/neovim/nvim/lua/pl/nvim-lspconfig.lua +++ /dev/null @@ -1,7 +0,0 @@ -local M = {} - -function M.config() - require 'lsp'.setup_lsp() -end - -return M diff --git a/neovim/nvim/lua/pl/nvim-notify.lua b/neovim/nvim/lua/pl/nvim-notify.lua deleted file mode 100644 index 7cb0941..0000000 --- a/neovim/nvim/lua/pl/nvim-notify.lua +++ /dev/null @@ -1,12 +0,0 @@ -local M = {} - -function M.init() - require 'notify'.setup { - render = 'default', - stages = 'slide', - top_down = false, - } - vim.notify = require 'notify' -end - -return M diff --git a/neovim/nvim/lua/pl/oil.lua b/neovim/nvim/lua/pl/oil.lua deleted file mode 100644 index aa15fa4..0000000 --- a/neovim/nvim/lua/pl/oil.lua +++ /dev/null @@ -1,133 +0,0 @@ -local M = {} - -function M.config() - require 'oil'.setup { - -- Oil will take over directory buffers (e.g. `vim .` or `:e src/`) - -- Set to false if you still want to use netrw. - default_file_explorer = false, - -- Id is automatically added at the beginning, and name at the end - -- See :help oil-columns - columns = { - 'icon', - -- 'permissions', - -- 'size', - -- 'mtime', - }, - -- Buffer-local options to use for oil buffers - buf_options = { - buflisted = false, - bufhidden = 'hide', - }, - -- Window-local options to use for oil buffers - win_options = { - wrap = false, - signcolumn = 'no', - cursorcolumn = false, - foldcolumn = '0', - spell = false, - list = false, - conceallevel = 3, - concealcursor = 'n', - }, - -- Restore window options to previous values when leaving an oil buffer - restore_win_options = true, - -- Skip the confirmation popup for simple operations - skip_confirm_for_simple_edits = false, - -- Deleted files will be removed with the trash_command (below). - delete_to_trash = false, - -- Change this to customize the command used when deleting to trash - trash_command = 'trash-put', - -- Selecting a new/moved/renamed file or directory will prompt you to save changes first - prompt_save_on_select_new_entry = true, - -- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap - -- options with a `callback` (e.g. { callback = function() ... end, desc = "", nowait = true }) - -- Additionally, if it is a string that matches "actions.", - -- it will use the mapping at require("oil.actions"). - -- Set to `false` to remove a keymap - -- See :help oil-actions for a list of all available actions - keymaps = { - ['g?'] = 'actions.show_help', - [''] = 'actions.select', - [''] = 'actions.select_vsplit', - [''] = 'actions.select_split', - [''] = 'actions.select_tab', - [''] = 'actions.preview', - [''] = 'actions.close', - [''] = 'actions.refresh', - ['-'] = 'actions.parent', - ['_'] = 'actions.open_cwd', - ['`'] = 'actions.cd', - ['~'] = 'actions.tcd', - ['g.'] = 'actions.toggle_hidden', - }, - -- Set to false to disable all of the above keymaps - use_default_keymaps = true, - view_options = { - -- Show files and directories that start with "." - show_hidden = false, - -- This function defines what is considered a "hidden" file - is_hidden_file = function(name, bufnr) - return vim.startswith(name, '.') - end, - -- This function defines what will never be shown, even when `show_hidden` is set - is_always_hidden = function(name, bufnr) - return false - end, - }, - -- Configuration for the floating window in oil.open_float - float = { - -- Padding around the floating window - padding = 2, - max_width = 0, - max_height = 0, - border = 'rounded', - win_options = { - winblend = 10, - }, - -- This is the config that will be passed to nvim_open_win. - -- Change values here to customize the layout - override = function(conf) - return conf - end, - }, - -- Configuration for the actions floating preview window - preview = { - -- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - -- min_width and max_width can be a single value or a list of mixed integer/float types. - -- max_width = {100, 0.8} means "the lesser of 100 columns or 80% of total" - max_width = 0.9, - -- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total" - min_width = { 40, 0.4 }, - -- optionally define an integer/float for the exact width of the preview window - width = nil, - -- Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) - -- min_height and max_height can be a single value or a list of mixed integer/float types. - -- max_height = {80, 0.9} means "the lesser of 80 columns or 90% of total" - max_height = 0.9, - -- min_height = {5, 0.1} means "the greater of 5 columns or 10% of total" - min_height = { 5, 0.1 }, - -- optionally define an integer/float for the exact height of the preview window - height = nil, - border = 'rounded', - win_options = { - winblend = 0, - }, - }, - -- Configuration for the floating progress window - progress = { - max_width = 0.9, - min_width = { 40, 0.4 }, - width = nil, - max_height = { 10, 0.9 }, - min_height = { 5, 0.1 }, - height = nil, - border = 'rounded', - minimized_border = 'none', - win_options = { - winblend = 0, - }, - }, - } -end - -return M diff --git a/neovim/nvim/lua/pl/onedark.lua b/neovim/nvim/lua/pl/onedark.lua deleted file mode 100644 index efc5959..0000000 --- a/neovim/nvim/lua/pl/onedark.lua +++ /dev/null @@ -1,9 +0,0 @@ -local M = {} - -function M.config() - vim.opt.termguicolors = true - vim.opt.cursorline = true - require 'onedark'.load() -end - -return M diff --git a/neovim/nvim/lua/pl/telescope.lua b/neovim/nvim/lua/pl/telescope.lua deleted file mode 100644 index 750d5fb..0000000 --- a/neovim/nvim/lua/pl/telescope.lua +++ /dev/null @@ -1,35 +0,0 @@ -local M = {} - -function M.config() - require 'telescope'.setup { - defaults = { file_ignore_patterns = { ".git" } }, - extensions = { - command_palette = require 'command_palette'.table, - undo = { - side_by_side = true, - layout_strategy = 'vertical', - layout_config = { - preview_height = 0.8 - } - } - }, - pickers = { - buffers = { - mappings = { - i = { - [''] = require 'telescope.actions'.close - }, - n = { - [''] = require 'telescope.actions'.close - } - } - } - } - } - require 'telescope'.load_extension 'command_palette' - require 'telescope'.load_extension 'gh' - require 'telescope'.load_extension 'notify' - require 'telescope'.load_extension 'undo' -end - -return M diff --git a/neovim/nvim/lua/pl/tree-sitter.lua b/neovim/nvim/lua/pl/tree-sitter.lua deleted file mode 100644 index 305813e..0000000 --- a/neovim/nvim/lua/pl/tree-sitter.lua +++ /dev/null @@ -1,31 +0,0 @@ -local M = {} - -function M.config() - require 'nvim-treesitter.configs'.setup { - sync_install = false, - auto_install = true, - highlight = { - enable = true, - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, - incremental_selection = { - enable = true, - -- TODO: 活用方法がいまいちわからない - keymaps = { - init_selection = "tnn", -- set to `false` to disable one of the mings - node_incremental = "grn", - scope_incremental = "grc", - node_decremental = "grm", - }, - }, - indent = { - enable = true - } - } -end - -return M diff --git a/neovim/nvim/lua/pl/twilight.lua b/neovim/nvim/lua/pl/twilight.lua deleted file mode 100644 index a765c58..0000000 --- a/neovim/nvim/lua/pl/twilight.lua +++ /dev/null @@ -1,11 +0,0 @@ -local M = {} - -function M.config() - require 'twilight'.setup { - dimming = { - alpha = 0.25 - } - } -end - -return M diff --git a/neovim/nvim/lua/pl/vim-partedit.lua b/neovim/nvim/lua/pl/vim-partedit.lua deleted file mode 100644 index 1367ac0..0000000 --- a/neovim/nvim/lua/pl/vim-partedit.lua +++ /dev/null @@ -1,7 +0,0 @@ -local M = {} - -function M.config() - vim.g['partedit#opener'] = ':tabe' -end - -return M diff --git a/neovim/nvim/lua/pl/which-key.lua b/neovim/nvim/lua/pl/which-key.lua deleted file mode 100644 index 3e2bc3e..0000000 --- a/neovim/nvim/lua/pl/which-key.lua +++ /dev/null @@ -1,9 +0,0 @@ -local M = {} - -function M.config() - vim.o.timeout = true - vim.o.timeoutlen = 300 - require 'which-key'.setup() -end - -return M diff --git a/neovim/nvim/lua/rc/base.lua b/neovim/nvim/lua/rc/base.lua deleted file mode 100644 index af06815..0000000 --- a/neovim/nvim/lua/rc/base.lua +++ /dev/null @@ -1,76 +0,0 @@ --- 基本的な設定 - --- 基本 -vim.opt.number = true -vim.opt.mouse = 'a' - --- インデント関係 -vim.opt.expandtab = true -- タブ文字が入力されたとき、スペース文字に変える -vim.opt.tabstop = 2 -vim.opt.shiftwidth = 2 -- '>>'等で入力されるインデントの深さ -vim.opt.softtabstop = 2 -- 2つのスペースを一文字であるかのように扱う - -vim.opt.virtualedit = 'block' -- 矩形選択で文字が無い部分にカーソルを移動できる - -vim.opt.scrolloff = 3 - --- 検索 -vim.opt.smartcase = true -- 検索ワードが小文字のみなら大文字小文字を無視 -vim.opt.wrapscan = true -- 最後まで検索したら最初に戻る -vim.opt.incsearch = true -vim.opt.hlsearch = true -vim.opt.ignorecase = true - --- ターミナル -local terminal_augroup = vim.api.nvim_create_augroup('terminal_augroup', { clear = true }) - --- ターミナルのバッファでは行番号非表示 -vim.api.nvim_create_autocmd('TermOpen', { - group = terminal_augroup, - pattern = '*', - command = 'setlocal nonumber' -}) - --- ターミナルのバッファを判別するための変数を設定 -vim.api.nvim_create_autocmd('TermOpen', { - group = terminal_augroup, - pattern = '*', - callback = function() - vim.b.this_is_a_terminal_buffer = true - end -}) - --- ターミナルウィンドウに切り替わったら自動的にインサートモードへ入る -vim.api.nvim_create_autocmd('BufEnter', { - group = terminal_augroup, - pattern = '*', - callback = function() - if vim.b.this_is_a_terminal_buffer then - vim.cmd('startinsert') - end - end -}) - --- シェル -if vim.fn.has('win32') == 1 then - -- WindowsではシェルはPowershellとする - -- see also :help shell-powershell - if vim.fn.executable('pwsh') then - vim.opt.shell = 'pwsh' - else - vim.opt.shell = 'powershell' - end - vim.opt.shellcmdflag = - '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;' - vim.opt.shellredir = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode' - vim.opt.shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode' - vim.opt.shellquote = '' - vim.opt.shellxquote = '' -end - --- 自動でquickfix windowを開く -vim.api.nvim_create_autocmd('QuickFixCmdPost', { - group = vim.api.nvim_create_augroup('auto_open_quickfix_window', { clear = true }), - pattern = '*', - command = 'cwindow' -}) diff --git a/neovim/nvim/lua/rc/disable_default_plugins.lua b/neovim/nvim/lua/rc/disable_default_plugins.lua deleted file mode 100644 index 64b76e8..0000000 --- a/neovim/nvim/lua/rc/disable_default_plugins.lua +++ /dev/null @@ -1,22 +0,0 @@ --- 高速化のためにデフォルトプラグインの一部を無効化する --- https://qiita.com/yasunori-kirin0418/items/4672919be73a524afb47#%E3%83%87%E3%83%95%E3%82%A9%E3%83%AB%E3%83%88%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%E3%81%AE%E7%84%A1%E5%8A%B9%E5%8C%96 - --- Disable :TOhtml -vim.g.loaded_2html_plugin = 1 - --- 圧縮ファイルを読み書きするプラグイン -vim.g.loaded_gzip = 1 -vim.g.loaded_tar = 1 -vim.g.loaded_tarPlugin = 1 -vim.g.loaded_zip = 1 -vim.g.loaded_zipPlugin = 1 - --- vimball -vim.g.loaded_vimball = 1 -vim.g.loaded_vimballPlugin = 1 - --- nvim-treeを使うためnetrwを読み込まない -vim.g.loaded_netrw = 1 -vim.g.loaded_netrwPlugin = 1 -vim.g.loaded_netrwSettings = 1 -vim.g.loaded_netrwFileHandlers = 1 diff --git a/neovim/nvim/lua/rc/gui.lua b/neovim/nvim/lua/rc/gui.lua deleted file mode 100644 index d3413ca..0000000 --- a/neovim/nvim/lua/rc/gui.lua +++ /dev/null @@ -1,7 +0,0 @@ --- GUIに関する設定 - -vim.o.guifont = 'HackGen Console NF:h10' -vim.o.autochdir = false -if vim.g.neovide then - vim.g.neovide_remember_window_size = false -end diff --git a/neovim/nvim/lua/rc/lib.lua b/neovim/nvim/lua/rc/lib.lua deleted file mode 100644 index 2bef6c5..0000000 --- a/neovim/nvim/lua/rc/lib.lua +++ /dev/null @@ -1,21 +0,0 @@ --- 他の(複数の)場所から使われる可能性のある関数 - -local M = {} - -function M.map(mode, key, cmd, desc, opt) - if opt == nil then opt = {} end - if opt['noremap'] == nil then opt['noremap'] = true end - if opt['silent'] == nil then opt['silent'] = true end - - if desc ~= nil then - if opt['desc'] == nil then - opt['desc'] = desc - else - print('warn: desc argument will be ignored') - end - end - - vim.keymap.set(mode, key, cmd, opt) -end - -return M diff --git a/neovim/nvim/lua/rc/plugins.lua b/neovim/nvim/lua/rc/plugins.lua deleted file mode 100644 index b5a93c0..0000000 --- a/neovim/nvim/lua/rc/plugins.lua +++ /dev/null @@ -1,329 +0,0 @@ --- プラグインに関する設定 --- --- vim: set foldmethod=marker : - --- lazy.nvim(プラグインマネージャ)を自動インストール -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) - -local plugins = { - -- { 'folke/lazy.nvim' }, - ----------------------------------------------------------------------------- - -- ライブラリ {{{ - ----------------------------------------------------------------------------- - -- }}} - - ----------------------------------------------------------------------------- - -- ファイルマネージャ {{{ - ----------------------------------------------------------------------------- - { - 'stevearc/oil.nvim', - dependencies = { - 'nvim-tree/nvim-web-devicons' - }, - config = require 'pl.oil'.config, - cmd = { 'Oil' } - }, - -- }}} - - ----------------------------------------------------------------------------- - -- 自動補完 {{{ - ----------------------------------------------------------------------------- - { - -- vim-vsnip - 'hrsh7th/vim-vsnip', - dependencies = { - { 'hrsh7th/vim-vsnip-integ', lazy = true }, - { 'rafamadriz/friendly-snippets', lazy = true }, - }, - event = { 'InsertEnter', 'CmdlineEnter' } - }, - { - -- nvim-cmp - 'hrsh7th/nvim-cmp', - dependencies = { - -- バッファ内の単語。普通フォールバック先として使う。ddc.vimのaroundソースに相当 - { 'hrsh7th/cmp-buffer', lazy = true }, - -- vsnipからの候補 - { 'hrsh7th/cmp-vsnip', lazy = true }, - -- lspからの候補 - { 'hrsh7th/cmp-nvim-lsp', lazy = true }, - { 'hrsh7th/cmp-nvim-lsp-signature-help', lazy = true }, - -- ファイルパスの補完ソース - { 'hrsh7th/cmp-path', lazy = true }, - -- コマンドラインでの補完ソース - { 'hrsh7th/cmp-cmdline', lazy = true }, - -- カーソル位置のメソッドのシグネチャを表示する - { 'hrsh7th/cmp-nvim-lsp-signature-help', lazy = true } - }, - init = require 'pl.nvim-cmp'.init, - config = require 'pl.nvim-cmp'.config, - event = { 'InsertEnter', 'CmdlineEnter' } - }, - -- }}} - - ----------------------------------------------------------------------------- - -- 未整理 {{{ - ----------------------------------------------------------------------------- - -- etc.lua -- - { - 'navarasu/onedark.nvim', -- カラースキーム - lazy = false, -- メインのカラースキームは確実に非同期で読み込むようにするらしい - priority = 1000, -- メインのカラースキームは他のプラグインよりも先に読み込まれるのが良いらしい - config = require 'pl.onedark'.config - }, - -- ファイラ - { - 'nvim-tree/nvim-tree.lua', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() require 'nvim-tree'.setup() end, - cmd = 'NvimTreeToggle', - }, - -- Webページ内のテキストボックスを編集するために外部のテキストエディタを使用できるようにするブラウザアドオンGhostTextに対応するためのプラグイン - -- Neovim側がサーバーとして動作する - -- GhostTextを利用するためにはneovimを予め立ち上げ、:GhostTextStartでサーバーを起動させておく必要がある - -- GhostTextとneovimはlocalhost:4001で通信する - { - 'subnut/nvim-ghost.nvim', - init = require 'pl.nvim-ghost'.init, - cmd = 'GhostTextStart' - }, - - -- fuzzy_finder.lua -- - -- ファジーファインダに関するプラグイン - { - 'nvim-telescope/telescope.nvim', - branch = '0.1.x', - dependencies = { - -- コマンドパレット(VSCodeのC-S-PあるいはF1で表示されるやつ) - { 'LinArcX/telescope-command-palette.nvim', lazy = true }, - { 'nvim-telescope/telescope-github.nvim', lazy = true }, - { 'debugloop/telescope-undo.nvim', lazy = true }, - }, - config = require 'pl.telescope'.config, - cmd = 'Telescope' - }, - - -- ide_like.lua -- - -- IDE風に操作するためのプラグイン達 - { - -- LSP用のUI - 'kkharji/lspsaga.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() require 'lspsaga'.setup() end, - event = 'LspAttach' - }, - { - -- quickfix, LSPのdiagnostics, referenceなどのリストを下部にきれいに表示する - 'folke/trouble.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() require 'trouble'.setup() end, - cmd = { 'TroubleToggle', 'TodoTrouble' }, - }, - { - -- いわゆるTODOコメントへ移動・一覧表示する - 'folke/todo-comments.nvim', - dependencies = 'folke/trouble.nvim', - config = function() require 'todo-comments'.setup() end, - event = { 'BufNewFile', 'BufRead' } - }, - { - -- キーマップを表示するやつ - 'folke/which-key.nvim', - lazy = true, -- 初めてrequire('which-key')が実行されたときにこのプラグインが読み込まれるようになる - config = require 'pl.which-key'.config, - }, - { - -- スクロールバーを表示する - 'petertriho/nvim-scrollbar', - config = function() require 'scrollbar'.setup() end, - event = { 'BufNewFile', 'BufRead' } - }, - { 'simrat39/rust-tools.nvim', lazy = true, ft = 'rust' }, -- LSPと連携してInline hintを表示するなど、いくつかの機能を追加する - { - 'saecki/crates.nvim', - tag = 'v0.3.0', -- TODO: バージョンを固定する必要があるのかわからない - dependencies = { 'nvim-lua/plenary.nvim' }, - event = { "BufRead Cargo.toml" }, - config = require 'pl.crates'.config, - }, - { - 'mfussenegger/nvim-jdtls', - lazy = true - }, - { - -- セッション - -- TODO: nvim-treeのウィンドウが復元されない - 'rmagatti/auto-session', - config = require 'pl.auto-session'.config, - }, - { - -- ドキュメントコメントを生成してくれるやつ - "danymat/neogen", - dependencies = "nvim-treesitter/nvim-treesitter", - config = require 'pl.neogen'.config, - cmd = 'Neogen' - -- Uncomment next line if you want to follow only stable versions - -- version = "*" - }, - { - 'lewis6991/gitsigns.nvim', - config = require 'pl.gitsigns'.config, - cmd = 'Gitsigns' - }, - { - 'tpope/vim-fugitive', - config = function() - -- nothing - end, - cmd = { 'Git' } - }, - - -- library.lua -- - -- ライブラリ的なプラグイン - { - -- 構文解析をしてくれるやつ。それぞれの言語用のパーサーを:TSInstallで別途インストールする必要があるので注意 - 'nvim-treesitter/nvim-treesitter', - build = ':TSUpdate', - lazy = true, - config = require 'pl.tree-sitter'.config, - cmd = { 'TSUpdate', 'TSEnable' }, - event = { 'BufNewFile', 'BufRead' } - }, - { 'nvim-lua/plenary.nvim' }, -- Luaの関数集。少なくともtodo-comments.nvimが依存している - { - 'nvim-tree/nvim-web-devicons', -- deviconに関するライブラリ。trouble.nvim, ddu-column-icon_filenameなどのアイコン表示が改善される - lazy = true, - config = function() require 'nvim-web-devicons'.setup() end - }, - - -- lsp.lua -- - -- LSPに関するプラグイン - { - 'neovim/nvim-lspconfig', - dependencies = { - 'williamboman/mason.nvim', - 'williamboman/mason-lspconfig.nvim' - }, - config = require 'pl.nvim-lspconfig'.config, - cmd = 'Mason', - event = { 'BufNewFile', 'BufRead' } - }, - { 'williamboman/mason.nvim', lazy = true }, - { 'williamboman/mason-lspconfig.nvim', lazy = true }, - { - 'j-hui/fidget.nvim', -- LSPの状態を右下に表示する - tag = 'legacy', -- TODO: - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = require 'pl.fidget'.config, - event = 'LspAttach' - }, - - -- motion.lua -- - -- 移動に関するプラグイン - { - -- LSPを使ってコードアウトラインを作り、移動できるようにするプラグイン - 'stevearc/aerial.nvim', - dependencies = 'nvim-treesitter/nvim-treesitter', - config = function() - require('aerial').setup {} - end, - cmd = { 'AerialOpen', 'AerialPrev', 'AerialNext' } - }, - { - -- easy-motionみたいなやつ - 'skanehira/jumpcursor.vim', - event = { 'BufRead' } - }, - - -- ui.lua -- - -- UIを改善するプラグイン - { - 'itchyny/lightline.vim', -- ステータスライン TODO: lualineを試す - dependencies = 'itchyny/vim-gitbranch', - init = require 'pl.lightline'.init, - event = { 'BufNewFile', 'BufRead' } - }, - { - 'itchyny/vim-gitbranch', -- Gitのブランチに関する情報を提供する。インストールされているとlightlineの該当機能が有効化される - lazy = true - -- TODO: gitsignsがあるからいらないのでは? - -- gitsignsに変える場合、遅延読み込みが課題である(gitbranchは軽いので同期読み込みでもよい) - }, - { - 'rcarriga/nvim-notify', - init = require 'pl.nvim-notify'.init, - }, - - -- util.lua -- - -- ユーティリティ的な小物のプラグイン - { - -- :Linediffコマンドで2つの選択した部分の差分を表示してくれる - 'AndrewRadev/linediff.vim', - cmd = 'Linediff' - }, - { - 'norcalli/nvim-colorizer.lua', -- カラーコードに色をつける - config = function() require 'colorizer'.setup() end, - event = { 'BufNewFile', 'BufRead' } - }, - { - 'cohama/lexima.vim', - event = 'InsertEnter', - init = require 'pl.lexima'.init, - config = require 'pl.lexima'.config, - }, - { - 'machakann/vim-sandwich', - event = { 'BufNewFile', 'BufRead' } - }, - { - 'thinca/vim-partedit', - cmd = 'Partedit', - config = require 'pl.vim-partedit'.config, - }, - - -- visual.lua -- - -- バッファの見た目にかかわるプラグイン。特にカーソル位置によって見た目の変わるもの - { - 'folke/twilight.nvim', -- 近くのメソッドだけを表示する - dependencies = 'nvim-treesitter/nvim-treesitter', - config = require 'pl.twilight'.config, - cmd = 'Twilight' - }, - --{ 'RRethy/vim-illuminate', -- カーソル下の単語をハイライトする。lsp, treesitter, 正規表現を使用して「同じ」単語を抽出する。さらに, で移動、でテキストオブジェクトとして参照できる - --config = function() - --require 'illuminate'.configure { - --filetypes_denylist = { 'netrw' } - --} - --end - --}, - - -- yuma.lua -- - -- 開発中・自作のプラグイン - { - 'yuma140902/auto-split-direction.nvim', - -- dir = '~/pj/nvim/auto-split-direction.nvim', - branch = 'master', - cmd = 'SplitAutoDirection', - config = require 'pl.auto-split-direction'.config, - }, - - -- }}} -} - -require 'lazy'.setup(plugins, { - defaults = { - lazy = false -- TODO: lazy = true - } -}) diff --git a/starship/manifest.json b/starship/manifest.json deleted file mode 100644 index 85410ce..0000000 --- a/starship/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "files": [ - { - "cond": "platform.system() == 'Linux'", - "src": "starship.ubuntu.toml", - "dst": "${XDG_CONFIG_HOME}/starship.toml" - }, - { - "cond": "platform.system() == 'Windows'", - "src": "starship.windows.toml", - "dst": "${XDG_CONFIG_HOME}/starship.toml" - } - ] -} diff --git a/starship/starship.ubuntu.toml b/starship/starship.ubuntu.toml deleted file mode 100644 index 35ad497..0000000 --- a/starship/starship.ubuntu.toml +++ /dev/null @@ -1,65 +0,0 @@ -add_newline = false - -format = """ -[\uf31b](202) \ -$username\ -$hostname\ -$shlvl\ -$kubernetes\ -$directory\ -$git_branch\ -$git_commit\ -$git_state\ -$git_status\ -$hg_branch\ -$docker_context\ -$package\ -$cmake\ -$dart\ -$dotnet\ -$elixir\ -$elm\ -$erlang\ -$golang\ -$helm\ -$java\ -$julia\ -$kotlin\ -$nim\ -$nodejs\ -$ocaml\ -$perl\ -$php\ -$purescript\ -$python\ -$ruby\ -$rust\ -$swift\ -$terraform\ -$zig\ -$nix_shell\ -$conda\ -$memory_usage\ -$aws\ -$gcloud\ -$openstack\ -$env_var\ -$crystal\ -$custom\ -$cmd_duration\ -\ -$line_break\ -\ -$lua\ -$jobs\ -$battery\ -$time\ -$status\ -$character""" - -[line_break] -disabled = false - -[character] -success_symbol = "[\ufb26](bold green)" -error_symbol = "[\ufb26](bold red)" diff --git a/starship/starship.windows.toml b/starship/starship.windows.toml deleted file mode 100644 index c621902..0000000 --- a/starship/starship.windows.toml +++ /dev/null @@ -1,65 +0,0 @@ -add_newline = false - -format = """ -[\ue70f](bright-cyan) \ -$username\ -$hostname\ -$shlvl\ -$kubernetes\ -$directory\ -$git_branch\ -$git_commit\ -$git_state\ -$git_status\ -$hg_branch\ -$docker_context\ -$package\ -$cmake\ -$dart\ -$dotnet\ -$elixir\ -$elm\ -$erlang\ -$golang\ -$helm\ -$java\ -$julia\ -$kotlin\ -$nim\ -$nodejs\ -$ocaml\ -$perl\ -$php\ -$purescript\ -$python\ -$ruby\ -$rust\ -$swift\ -$terraform\ -$zig\ -$nix_shell\ -$conda\ -$memory_usage\ -$aws\ -$gcloud\ -$openstack\ -$env_var\ -$crystal\ -$custom\ -$cmd_duration\ -\ -$line_break\ -\ -$lua\ -$jobs\ -$battery\ -$time\ -$status\ -$character""" - -[line_break] -disabled = false - -[character] -success_symbol = "[\ufb26](bold green)" -error_symbol = "[\ufb26](bold red)" diff --git a/termite/manifest.json b/termite/manifest.json deleted file mode 100644 index a266155..0000000 --- a/termite/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "files": [ - { - "src": "termite", - "dst": "${XDG_CONFIG_HOME}/termite" - } - ] -} diff --git a/termite/termite/config b/termite/termite/config deleted file mode 100644 index 5acb5e1..0000000 --- a/termite/termite/config +++ /dev/null @@ -1,88 +0,0 @@ -[options] -allow_bold = true -audible_bell = false -#bold_is_bright = true -#cell_height_scale = 1.0 -#cell_width_scale = 1.0 -clickable_url = true -dynamic_title = true -font = HackGenNerd 13 -#fullscreen = true -#icon_name = terminal -#mouse_autohide = false -#scroll_on_output = false -#scroll_on_keystroke = true -# Length of the scrollback buffer, 0 disabled the scrollback buffer -# and setting it to a negative value means "infinite scrollback" -scrollback_lines = 10000 -#search_wrap = true -#urgent_on_bell = true -#hyperlinks = false - -# $BROWSER is used by default if set, with xdg-open as a fallback -#browser = xdg-open - -# "system", "on" or "off" -#cursor_blink = system - -# "block", "underline" or "ibeam" -#cursor_shape = block - -# Hide links that are no longer valid in url select overlay mode -#filter_unmatched_urls = true - -# Emit escape sequences for extra modified keys -#modify_other_keys = false - -# set size hints for the window -#size_hints = false - -# "off", "left" or "right" -#scrollbar = off - -[colors] -# If both of these are unset, cursor falls back to the foreground color, -# and cursor_foreground falls back to the background color. -#cursor = #dcdccc -#cursor_foreground = #dcdccc - -#foreground = #dcdccc -#foreground_bold = #ffffff -#background = #3f3f3f - -# 20% background transparency (requires a compositor) -#background = rgba(63, 63, 63, 0.8) - -# If unset, will reverse foreground and background -highlight = #2f2f2f - -# Colors from color0 to color254 can be set -color0 = #3f3f3f -color1 = #705050 -color2 = #60b48a -color3 = #dfaf8f -color4 = #506070 -color5 = #dc8cc3 -color6 = #8cd0d3 -color7 = #dcdccc -color8 = #709080 -color9 = #dca3a3 -color10 = #c3bf9f -color11 = #f0dfaf -color12 = #94bff3 -color13 = #ec93d3 -color14 = #93e0e3 -color15 = #ffffff - -[hints] -#font = Monospace 12 -#foreground = #dcdccc -#background = #3f3f3f -#active_foreground = #e68080 -#active_background = #3f3f3f -#padding = 2 -#border = #3f3f3f -#border_width = 0.5 -#roundness = 2.0 - -# vim: ft=dosini cms=#%s diff --git a/tig/.tigrc b/tig/.tigrc deleted file mode 100644 index bd8a207..0000000 --- a/tig/.tigrc +++ /dev/null @@ -1,39 +0,0 @@ -set main-view = date:custom,format="%Y-%m-%d %H:%M" date:display=relative-compact author:width=4 commit-title:graph=yes,refs=yes -set refs-view = date:custom,format="%Y-%m-%d %H:%M" date:display=relative-compact author:full ref commit-title -set stash-view = date:custom,format="%Y-%m-%d %H:%M" date:display=relative-compact author:full commit-title -set blame-view = id:yes,color file-name:auto author:full date:custom,format="%Y-%m-%d %H:%M" date:display=relative-compact line-number:yes,interval=1 text -set tree-view = mode author:full file-size date:custom,format="%Y-%m-%d %H:%M" date:display=relative-compact file-name - -bind main H ?git reset --hard %(commit) -bind diff H ?git reset --hard %(commit) -bind refs H ?git reset --hard %(branch) - -bind main ! ?git revert %(commit) -bind main !git rebase -i %(commit) - -bind refs M ?git merge %(branch) - -bind status U @git add --all - -# stashの操作 -bind stash C ?git stash push "%(prompt Enter stash comment: )" -bind stash U ?git stash push -u "%(prompt Enter stash comment: )" -bind stash P ?git stash pop %(stash) -bind stash A ?git stash apply %(stash) -bind stash ! ?git stash drop %(stash) - -# クリップボード -bind generic @ @pwsh -NoProfile -C "Set-Clipboard -Value %(commit)" -# bind generic @ @bash -c "echo -n '%(commit)' | clip" - -# リモート -bind generic F ?git fetch %(remote) -bind main F ?git fetch %(remote) # デフォルト設定を上書き -bind generic U ?git pull %(remote) -bind generic ?git push -u %(remote) %(repo:head) - -# 追加コミット -bind status + !git commit --amend --allow-empty - -# 直前のコミットをコミット前の状態に戻す -bind generic ^ ?git reset --soft HEAD^ diff --git a/tig/manifest.json b/tig/manifest.json deleted file mode 100644 index d865ba7..0000000 --- a/tig/manifest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "files": [ - ".tigrc" - ] -} diff --git a/vsvim/.vsvimrc b/vsvim/.vsvimrc deleted file mode 100644 index 3eeb741..0000000 --- a/vsvim/.vsvimrc +++ /dev/null @@ -1,2 +0,0 @@ -" jjで -inoremap jj diff --git a/vsvim/manifest.json b/vsvim/manifest.json deleted file mode 100644 index 28e6071..0000000 --- a/vsvim/manifest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "files": [ - { - "cond": "platform.system() == 'Windows'", - "src": ".vsvimrc", - "dst": ".vsvimrc" - } - ] -} diff --git a/wezterm/.wezterm.lua b/wezterm/.wezterm.lua deleted file mode 100644 index 5e6b0df..0000000 --- a/wezterm/.wezterm.lua +++ /dev/null @@ -1,42 +0,0 @@ -local wezterm = require 'wezterm' - -local config = {} - -if wezterm.config_builder then - config = wezterm.config_builder() -end - ---config.font = wezterm.font 'HackGen Console NF' ---config.font = wezterm.font 'UDEV Gothic NF' -config.font = wezterm.font 'PlemolJP Console NF' -config.font_size = 10.0 -config.use_ime = true -config.color_scheme = 'OneDark (base16)' -config.default_prog = { 'C:\\Program Files\\PowerShell\\7\\pwsh.exe' } -config.window_decorations = 'INTEGRATED_BUTTONS|RESIZE' -config.window_padding = { - left = 1, - right = 0, - top = 0, - bottom = 0, -} -config.window_background_opacity = 1.0 --- config.win32_system_backdrop = 'Mica' -config.default_cursor_style = 'SteadyBlock' -config.cursor_blink_rate = 800 -config.cursor_blink_ease_in = 'Constant' -config.cursor_blink_ease_out = 'Constant' -config.initial_rows = 26 -config.initial_cols = 93 -config.launch_menu = { - { - label = 'System status (btm)', - args = { 'btm' } - }, - { - label = 'cmd.exe', - args = { 'cmd' } - } -} - -return config diff --git a/wezterm/manifest.json b/wezterm/manifest.json deleted file mode 100644 index 2c16ab6..0000000 --- a/wezterm/manifest.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "files": [ - ".wezterm.lua" - ] -} diff --git a/zsh/.zshrc b/zsh/.zshrc deleted file mode 100644 index a1f4a37..0000000 --- a/zsh/.zshrc +++ /dev/null @@ -1,67 +0,0 @@ -# Lines configured by zsh-newuser-install -HISTFILE=~/.histfile -HISTSIZE=1000 -SAVEHIST=1000 -setopt extendedglob nomatch notify -unsetopt autocd beep -bindkey -e -# End of lines configured by zsh-newuser-install -# The following lines were added by compinstall -zstyle :compinstall filename '/home/yuma/.zshrc' - -autoload -Uz compinit -compinit -# End of lines added by compinstall - -### Added by Zinit's installer -if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then - print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f" - command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit" - command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \ - print -P "%F{33} %F{34}Installation successful.%f%b" || \ - print -P "%F{160} The clone has failed.%f%b" -fi - -source "$HOME/.local/share/zinit/zinit.git/zinit.zsh" -autoload -Uz _zinit -(( ${+_comps} )) && _comps[zinit]=_zinit - -# Load a few important annexes, without Turbo -# (this is currently required for annexes) -zinit light-mode for \ - zdharma-continuum/zinit-annex-as-monitor \ - zdharma-continuum/zinit-annex-bin-gem-node \ - zdharma-continuum/zinit-annex-patch-dl \ - zdharma-continuum/zinit-annex-rust - -### End of Zinit's installer chunk - -# シンタックスハイライト -zinit light zsh-users/zsh-syntax-highlighting - -# 履歴のサジェスト -zinit light zsh-users/zsh-autosuggestions - -# まだzsh本体に取り込まれていない補完スクリプト -zinit light zsh-users/zsh-completions - -# プロンプト -zinit ice pick"async.zsh" src"pure.zsh" -zinit light sindresorhus/pure - -. "$HOME/.cargo/env" - -# pyenv -export PYENV_ROOT="$HOME/.pyenv" -command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init -)" - -eval "$(zoxide init zsh)" - -export PATH=$PATH:~/.local/bin/:~/go/bin - -source /usr/share/nvm/init-nvm.sh - -alias ls='lsd' -alias grep='grep --color=auto' - diff --git a/zsh/manifest.json b/zsh/manifest.json deleted file mode 100644 index 520bc32..0000000 --- a/zsh/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "zsh", - "description": "zshの設定ファイル", - "notice": "プラグインをインストールするためにzshを一度起動する必要があります", - "files": [ - ".zshrc" - ] -}