Compare commits
No commits in common. "98ed56e5da35975688cdd29b23cb0348a6c04fb6" and "5fb1aab87964c1b0a0c02ba57dc9eccacac2145e" have entirely different histories.
98ed56e5da
...
5fb1aab879
@ -111,9 +111,6 @@ call plug#begin('~/.config/nvim/plugged')
|
||||
Plug 'pearofducks/ansible-vim', { 'do': './UltiSnips/generate.sh' }
|
||||
Plug 'Yggdroot/indentLine'
|
||||
|
||||
" Terraform
|
||||
Plug 'hashivim/vim-terraform'
|
||||
|
||||
" Multiple cursors
|
||||
Plug 'terryma/vim-multiple-cursors'
|
||||
|
||||
@ -127,7 +124,7 @@ call plug#begin('~/.config/nvim/plugged')
|
||||
Plug 'tpope/vim-fugitive'
|
||||
|
||||
" Prettier
|
||||
Plug 'prettier/vim-prettier', { 'do': 'yarn install --frozen-lockfile --production' }
|
||||
Plug 'prettier/vim-prettier'
|
||||
|
||||
" Debug
|
||||
Plug 'puremourning/vimspector'
|
||||
@ -156,15 +153,8 @@ call plug#begin('~/.config/nvim/plugged')
|
||||
Plug 'nvim-tree/nvim-web-devicons'
|
||||
Plug 'nvim-tree/nvim-tree.lua'
|
||||
|
||||
" SHFMT
|
||||
Plug 'z0mbix/vim-shfmt', { 'for': 'sh' }
|
||||
|
||||
" Mikrotik
|
||||
Plug 'zainin/vim-mikrotik'
|
||||
|
||||
Plug 'nvim-treesitter/nvim-treesitter'
|
||||
Plug 'nvim-treesitter/nvim-treesitter-context'
|
||||
|
||||
call plug#end()
|
||||
|
||||
" LUA
|
||||
@ -200,7 +190,7 @@ local handlers = {
|
||||
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches
|
||||
local servers = { 'pyright', 'bashls', 'yamlls', 'ansiblels', 'gopls', 'solargraph', 'terraformls', 'tflint' }
|
||||
local servers = { 'pyright', 'bashls', 'yamlls', 'ansiblels', 'gopls', 'solargraph', 'terraformls'}
|
||||
for _, lsp in pairs(servers) do
|
||||
require('lspconfig')[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
@ -327,8 +317,6 @@ cmp.setup.cmdline('/', {
|
||||
require("nvim-tree").setup({
|
||||
})
|
||||
|
||||
|
||||
require'treesitter-context'.setup{}
|
||||
EOF
|
||||
|
||||
" Added popout window to see diagnostic
|
||||
@ -339,7 +327,7 @@ autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=fals
|
||||
let g:neoformat_try_formatprg = 1
|
||||
let g:neoformat_basic_format_trim = 1
|
||||
let g:neoformat_only_msg_on_error = 1
|
||||
autocmd BufWritePre * silent! undojoin | Neoformat
|
||||
autocmd BufWritePre * silent! undojoin | Neoformat prettier
|
||||
let g:neoformat_python_black = {
|
||||
\ 'exe': 'black',
|
||||
\ 'stdin': 1,
|
||||
@ -347,9 +335,6 @@ let g:neoformat_python_black = {
|
||||
\ }
|
||||
let g:neoformat_enabled_python = ['black']
|
||||
|
||||
" Terraform
|
||||
let g:terraform_fmt_on_save=1
|
||||
let g:terraform_align=1
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
@ -576,6 +561,7 @@ EOF
|
||||
" Files
|
||||
""""""""""""""""""""""""""""""""
|
||||
|
||||
|
||||
" Bash
|
||||
if executable('shfmt')
|
||||
let &l:formatprg='shfmt -i ' . &l:shiftwidth . ' -ln posix -sr -ci -s'
|
||||
@ -622,10 +608,6 @@ au BufNewFile,BufRead *.mikrotik setfiletype routeros
|
||||
" Ebuild
|
||||
au BufNewFile,BufRead,BufWritePre *.ebuild let g:shfmt_extra_args = '-ci -sr -s'
|
||||
|
||||
" Terrafrom
|
||||
autocmd BufWritePre *.tf lua vim.lsp.buf.formatting_sync()
|
||||
autocmd BufWritePre *.tfvars lua vim.lsp.buf.formatting_sync()
|
||||
|
||||
" Automatically deletes all trailing whitespace and newlines at end of file on save.
|
||||
autocmd BufWritePre * %s/\s\+$//e
|
||||
autocmd BufWritepre * %s/\n\+\%$//e
|
||||
|
@ -44,24 +44,10 @@ function install_shfmt() {
|
||||
GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@latest
|
||||
}
|
||||
|
||||
function install_terraform() {
|
||||
# Install terraform and terraform-ls
|
||||
GO111MODULE=on go install github.com/hashicorp/terraform@latest
|
||||
GO111MODULE=on go install github.com/hashicorp/terraform-ls@latest
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
brew install tflint
|
||||
else
|
||||
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
|
||||
fi
|
||||
}
|
||||
|
||||
function install_shellcheck() {
|
||||
# Install shellcheck
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
brew install shellcheck
|
||||
else
|
||||
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
|
||||
fi
|
||||
[[ "$(uname)" == "Darwin" ]] && brew install shellcheck
|
||||
sudo emerge shellcheck-bin
|
||||
}
|
||||
|
||||
function install_gopls() {
|
||||
@ -98,7 +84,6 @@ function main() {
|
||||
command_start install_shfmt
|
||||
command_start install_shellcheck
|
||||
command_start install_gopls
|
||||
command_start install_terraform
|
||||
command_start install_black
|
||||
command_start install_ansible
|
||||
command_start install_meraki_ansible
|
||||
|
Loading…
Reference in New Issue
Block a user