summaryrefslogtreecommitdiff
path: root/pack/ache/start/installPlugin.py
blob: 16669c5c65179d329ca0396e9c111da49e3e1c4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#!/bin/env python

import subprocess


list_of_plugins = [

# ale
#
# Check for error and format. 👍
  "https://github.com/dense-analysis/ale.git",

# coc.nvim
#
# A powerfull completion system based on LSP
  ("https://github.com/neoclide/coc.nvim.git", "release"),

# leap.nvim
#
# A powerfull visual movement system
  "https://github.com/ggandor/leap.nvim",


# A good status line
  "https://github.com/vim-airline/vim-airline",

# ☠️ Vimspector
#
# Integrate gdb inside vim
#   "https://github.com/puremourning/vimspector",

# nvim-tree.lua
#
# A smart and light file browser
  "https://github.com/kyazdani42/nvim-tree.lua",

# gen_tags.vim
#
# To generate tag for C based languages
#  "https://github.com/jsfaint/gen_tags.vim",

# hexmode
#
# Switch to Hexmode with xxd, not very usefull
  "https://github.com/fidian/hexmode.git",

# Git integration
#
#  "https://github.com/tpope/vim-fugitive",

# Use "cs" to modified a surround character
"https://github.com/tpope/vim-surround",
# Color matching parentheses
"https://github.com/junegunn/rainbow_parentheses.vim",

# Quick comment/uncomment with "gcc"
#
"https://github.com/tpope/vim-commentary",

# Fix the repeat map, not usefull
# "https://github.com/tpope/vim-repeat"


# Powerfull align tool, hard to remember
  "https://github.com/godlygeek/tabular",

# A dark colorscheme
  "https://github.com/sjl/badwolf",
# A lighter dark colorscheme
  "https://github.com/nanotech/jellybeans.vim",
# A colection of colorschemes
  "https://github.com/lithammer/vim-eighties",

# Fuzzy search and ripgrep integration
  "https://github.com/junegunn/fzf.vim",
  "https://github.com/junegunn/fzf",

# A color integration that is beautifull and quick
  "https://github.com/RRethy/vim-hexokinase",

# Display registers content as auto completion 👍
  "https://github.com/tversteeg/registers.nvim",

# Rename XML open/close tag when the other one is modified
  "https://github.com/AndrewRadev/tagalong.vim",

# Grammalecte
#
# French corrector integration
  "https://github.com/dpelle/vim-Grammalecte",

# Neovim in Firefox
#  "https://github.com/glacambre/firenvim"

# List of snippets
  "https://github.com/honza/vim-snippets",

# Add cscope function to neovim
  "https://github.com/dhananjaylatkar/cscope_maps.nvim",


# Language specific support
  "https://github.com/jparise/vim-graphql",
  "https://github.com/rust-lang/rust.vim",
  "https://github.com/hail2u/vim-css3-syntax",
  "https://github.com/pangloss/vim-javascript",
  "https://github.com/khaveesh/vim-fish-syntax",
  "https://github.com/fatih/vim-go",
  "https://github.com/moll/vim-node",
  "https://github.com/evanleck/vim-svelte"
]

list_coc_plugins = [
# C based support
  "coc-clangd",
# JS support
  "coc-svelte",
  "coc-tsserver",
  "coc-deno",
# Python support
  "coc-pyright",
# Web support
  "coc-html",
  "coc-css",
# Various snippets
  "coc-snippets"
]

for plugin in list_of_plugins:
  if type(plugin) is tuple:
      subprocess.run(["git", "clone", "--branch", plugin[1], plugin[0], "--depth=1"])
  else:
      subprocess.run(["git", "clone", plugin, "--depth=1"])

# Post install script

with open('rainbow_parentheses.vim/plugin/rainbow_parentheses.vim', 'a') as f:
    f.write('\n:RainbowParentheses\n')
print('Post install Rainbow Parentheses done ✔️')

subprocess.run(["make", "hexokinase"], cwd="vim-hexokinase")
print('Post install Hexakinase done ✔️')

installCmd = f"+:CocInstall {' '.join(list_coc_plugins)}"
subprocess.run(["nvim", installCmd])
print('Coc plugins install done ✔️')

print("Please check health 🏥")
subprocess.run(["nvim", "+:checkhealth"])