feat: add all missing from backlog
This commit is contained in:
parent
2fa4e8b410
commit
3b349870d8
@ -37,59 +37,6 @@ require("nvim-tree").setup({
|
||||
},
|
||||
})
|
||||
|
||||
-- mason
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup()
|
||||
|
||||
-- lspconfig
|
||||
-- require('lspconfig')['gofumpt'].setup{}
|
||||
-- require('lspconfig')['golines'].setup{}
|
||||
-- require('lspconfig')['goimports'].setup{}
|
||||
require('lspconfig')['gopls'].setup{
|
||||
on_attach = on_attach,
|
||||
cmd = {"gopls"},
|
||||
filetypes = {"go", "gomod", "gowork", "dotmpl"},
|
||||
settings = {
|
||||
gopls = {
|
||||
gofumpt = true,
|
||||
completeUnimported = true,
|
||||
usePlaceholders = true,
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
require('lspconfig')['pyright'].setup {
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
}
|
||||
require('lspconfig')['powershell_es'].setup{}
|
||||
require('lspconfig')['clangd'].setup{}
|
||||
require('lspconfig')['rust_analyzer'].setup{}
|
||||
require('lspconfig')['ansiblels'].setup{}
|
||||
require('lspconfig')['bashls'].setup{}
|
||||
require('lspconfig')['lua_ls'].setup{
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim', 'on_attach', 'lsp_flags'}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
require('lspconfig')['yamlls'].setup{
|
||||
settings = {
|
||||
yaml = {
|
||||
customTags = { '!vault'}
|
||||
}
|
||||
}
|
||||
}
|
||||
require('lspconfig')['intelephense'].setup{}
|
||||
require('lspconfig')['grammarly'].setup{}
|
||||
require('lspconfig')['puppet'].setup{}
|
||||
require('lspconfig')['terraformls'].setup{}
|
||||
|
||||
-- Completion Plugin Setup
|
||||
local cmp = require'cmp'
|
||||
cmp.setup({
|
||||
@ -143,10 +90,87 @@ cmp.setup({
|
||||
},
|
||||
})
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||
|
||||
-- mason
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup()
|
||||
|
||||
-- lspconfig
|
||||
-- require('lspconfig')['gofumpt'].setup{}
|
||||
-- require('lspconfig')['golines'].setup{}
|
||||
-- require('lspconfig')['goimports'].setup{}
|
||||
require('lspconfig')['gopls'].setup{
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
cmd = {"gopls"},
|
||||
filetypes = {"go", "gomod", "gowork", "dotmpl"},
|
||||
settings = {
|
||||
gopls = {
|
||||
gofumpt = true,
|
||||
completeUnimported = true,
|
||||
usePlaceholders = true,
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
require('lspconfig')['pyright'].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
flags = lsp_flags,
|
||||
}
|
||||
require('lspconfig')['powershell_es'].setup{}
|
||||
require('lspconfig')['clangd'].setup{}
|
||||
require('lspconfig')['rust_analyzer'].setup{}
|
||||
require('lspconfig')['ansiblels'].setup{
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
require('lspconfig')['bashls'].setup{
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
require('lspconfig')['lua_ls'].setup{
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim', 'on_attach', 'lsp_flags'}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
require('lspconfig')['yamlls'].setup{
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
yaml = {
|
||||
customTags = { '!vault'}
|
||||
}
|
||||
}
|
||||
}
|
||||
require('lspconfig')['intelephense'].setup{}
|
||||
require('lspconfig')['grammarly'].setup{}
|
||||
require('lspconfig')['puppet'].setup{}
|
||||
require('lspconfig')['terraformls'].setup{
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
vim.api.nvim_create_autocmd({"BufWritePre"}, {
|
||||
pattern = {"*.tf", "*.tfvars"},
|
||||
callback = function()
|
||||
vim.lsp.buf.format()
|
||||
end,
|
||||
})
|
||||
|
||||
-- treesitter
|
||||
require('nvim-treesitter.configs').setup {
|
||||
--ensure_installed = { "lua", "toml", "python", "bash", "yaml", "go" },
|
||||
ensure_installed = "all",
|
||||
ensure_installed = { "lua", "toml", "python", "bash", "yaml", "go" },
|
||||
--ensure_installed = "all",
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
@ -226,3 +250,15 @@ require('mini.indentscope').setup()
|
||||
require('mini.splitjoin').setup()
|
||||
require('mini.surround').setup()
|
||||
require('mini.trailspace').setup()
|
||||
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
pattern = "*.py",
|
||||
callback = function()
|
||||
vim.defer_fn(function()
|
||||
local venv_path = vim.fn.getcwd() .. "/.venv/bin/python"
|
||||
if vim.fn.filereadable(venv_path) == 1 then
|
||||
vim.cmd("PyrightSetPythonPath " .. venv_path)
|
||||
end
|
||||
end, 1000) -- 1 second delay (1000ms)
|
||||
end,
|
||||
})
|
||||
|
||||
@ -49,4 +49,12 @@ vim.cmd [[
|
||||
augroup END
|
||||
]]
|
||||
|
||||
|
||||
-- tmpl language keybindings
|
||||
vim.cmd [[
|
||||
augroup lang_tmpl
|
||||
autocmd!
|
||||
autocmd BufNewFile,BufRead *.yml.tmpl set filetype=yaml
|
||||
autocmd BufNewFile,BufRead *.yaml.tmpl set filetype=yaml
|
||||
autocmd BufNewFile,BufRead *.hcl.tmpl set filetype=hcl
|
||||
augroup END
|
||||
]]
|
||||
|
||||
@ -50,7 +50,9 @@ function! OpenPuppetProfileOrRole(layout)
|
||||
let module_list = []
|
||||
call add(module_list, 'certbot')
|
||||
call add(module_list, 'droneci')
|
||||
call add(module_list, 'frrouting')
|
||||
call add(module_list, 'glauth')
|
||||
call add(module_list, 'incus')
|
||||
call add(module_list, 'jellyfin')
|
||||
call add(module_list, 'lidarr')
|
||||
call add(module_list, 'networking')
|
||||
|
||||
@ -50,6 +50,7 @@ return require('packer').startup(function(use)
|
||||
use { 'numToStr/FTerm.nvim' } -- floating terminal
|
||||
use { 'HampusHauffman/block.nvim' } -- code blocks in different colours
|
||||
use { 'rodjek/vim-puppet' } -- vim puppet enhancements
|
||||
use { 'jvirtanen/vim-hcl' } -- hcl syntax highlighting
|
||||
-- use { 'fatih/vim-go' } -- go-vim
|
||||
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 1a98679ade8d9d2c1c191f885ab2365d5d3fea02
|
||||
Subproject commit 453bd93cf9a7f203d4ad62f078746a94ffd77020
|
||||
@ -32,6 +32,8 @@ if command -v nvim >/dev/null 2>&1; then
|
||||
alias vi='nvim'
|
||||
fi
|
||||
alias purevim='vim -u NONE'
|
||||
alias vimp='xargs nvim -p'
|
||||
|
||||
|
||||
# tmux
|
||||
if [[ -n $TMUX ]]; then
|
||||
|
||||
@ -17,7 +17,8 @@ export ANSIBLE_VAULT_PASSWORD_FILE=$HOME/.local/bin/ansible-vault-pass-client
|
||||
# VAULT
|
||||
export VAULT_ADDR=https://vault.service.consul:8200
|
||||
vaultlogin () {
|
||||
vault login $(pass show personal/vault/syd1/token)
|
||||
#vault login $(pass show personal/vault/syd1/token)
|
||||
export VAULT_TOKEN=$(vault login --field=token --method=ldap username=benvin)
|
||||
}
|
||||
|
||||
# CONSUL: https://developer.hashicorp.com/consul/commands
|
||||
@ -26,6 +27,9 @@ export CONSUL_HTTP_TOKEN_FILE=$HOME/.config/consul/token.secret
|
||||
export CONSUL_HTTP_SSL=true
|
||||
export CONSUL_HTTP_SSL_VERIFY=true
|
||||
|
||||
# NOMAD
|
||||
export NOMAD_ADDR=https://nomad.service.consul:4646
|
||||
|
||||
# set MPD host
|
||||
export MPD_HOST="$HOME/.config/mpd/socket"
|
||||
|
||||
|
||||
@ -154,3 +154,12 @@ export SSH_AUTH_SOCK
|
||||
# load shell settings
|
||||
test -r $XDG_CONFIG_HOME/shell/common && source $XDG_CONFIG_HOME/shell/common
|
||||
test -r $XDG_CONFIG_HOME/shell/aliases && source $XDG_CONFIG_HOME/shell/aliases
|
||||
|
||||
# autocomplete tools
|
||||
autoload -U +X bashcompinit && bashcompinit
|
||||
complete -o nospace -C /usr/bin/terraform terraform
|
||||
complete -o nospace -C /usr/bin/consul consul
|
||||
complete -o nospace -C /usr/bin/nomad nomad
|
||||
complete -o nospace -C /usr/bin/vault vault
|
||||
eval "$(uv generate-shell-completion zsh)"
|
||||
eval "$(nfpm completion zsh)"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user