all repos — dotfiles @ 8557d60f53a55812867a03dde504f30bf21fbfff

linux dotfiles

update nvim config
Prithu Goswami pg@prithu.dev
Sat, 13 Jul 2024 18:38:53 +0530
commit

8557d60f53a55812867a03dde504f30bf21fbfff

parent

ab1de17aea72b6ccc8d5b9c62bac38fc4c2d3125

M config/nvim/ftdetect/hcl.vimconfig/nvim/ftdetect/hcl.vim

@@ -1,10 +1,10 @@

-silent! autocmd! filetypedetect BufRead,BufNewFile *.tf -autocmd BufNewFile,BufRead *.hcl set filetype=hcl +" silent! autocmd! filetypedetect BufRead,BufNewFile *.tf +" autocmd BufNewFile,BufRead *.hcl set filetype=hcl -" Nomad -autocmd BufNewFile,BufRead *.nomad set filetype=hcl +" " Nomad +" autocmd BufNewFile,BufRead *.nomad set filetype=hcl -" Terraform -autocmd BufNewFile,BufRead *.tf set filetype=hcl -autocmd BufNewFile,BufRead *.tfvars set filetype=hcl -autocmd BufRead,BufNewFile *.tfstate,*.tfstate.backup set filetype=json +" " Terraform +" autocmd BufNewFile,BufRead *.tf set filetype=hcl +" autocmd BufNewFile,BufRead *.tfvars set filetype=hcl +" autocmd BufRead,BufNewFile *.tfstate,*.tfstate.backup set filetype=json
M config/nvim/init.luaconfig/nvim/init.lua

@@ -175,3 +175,5 @@ autocmd BufRead *jsx setlocal sw=2

autocmd BufRead *tsx setlocal sw=2 autocmd FileType markdown setlocal spell ]]) + +vim.cmd('let g:copilot_enabled = 0')
M config/nvim/lua/lsp/init.luaconfig/nvim/lua/lsp/init.lua

@@ -95,6 +95,11 @@ }

} } +lspconfig.ruff.setup{ + capabilities=capabilities, + on_attach=on_attach +} + lspconfig.gopls.setup{ capabilities = capabilities, on_attach = on_attach

@@ -147,6 +152,18 @@ end

return true end } + +lspconfig.terraformls.setup{ + capabilities = capabilities, + on_attach = on_attach +} + +vim.api.nvim_create_autocmd({"BufWritePre"}, { + pattern = {"*.tf", "*.tfvars"}, + callback = function() + vim.lsp.buf.format() + end, +}) -- lspconfig.terraformls.setup{ -- capabilities = capabilities,
M config/nvim/lua/options.luaconfig/nvim/lua/options.lua

@@ -28,6 +28,7 @@ -- vim.o.statusline = "%{%v:lua.require'nvim-navic'.get_location()%}"

vim.o.statusline="%<%f %{%v:lua.require'nvim-navic'.get_location()%} %h%m%r%=%-14.(%l,%c%V%) %P" +-- base16-material-darker vim.cmd('colorscheme base16-classic-dark') vim.cmd('filetype plugin indent on')
M config/nvim/lua/plugins.luaconfig/nvim/lua/plugins.lua

@@ -44,6 +44,7 @@ use 'hrsh7th/cmp-nvim-lsp'

use 'L3MON4D3/LuaSnip' use 'saadparwaiz1/cmp_luasnip' use 'rafamadriz/friendly-snippets' + use 'github/copilot.vim' -- tpope deserves his own section. All hail lord tpope! use 'tpope/vim-fugitive'

@@ -75,3 +76,4 @@ }

} end) +