This commit is contained in:
Jacob Bohanon
2024-09-23 10:04:26 -04:00
parent 8ffa24ce52
commit eb4ded42d7
3 changed files with 9 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ vim.api.nvim_create_augroup('jbohanon', {clear=true})
-- command = '%s/\\s\\+$//e', -- command = '%s/\\s\\+$//e',
-- }) -- })
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
pattern = {'yaml','cpp'}, pattern = {'yaml','cpp', 'tsx'},
group = 'jbohanon', group = 'jbohanon',
command = 'setlocal tabstop=2 softtabstop=2 sw=2 expandtab indentkeys-=0# indentkeys-=<:>', command = 'setlocal tabstop=2 softtabstop=2 sw=2 expandtab indentkeys-=0# indentkeys-=<:>',
}) })

View File

@@ -42,6 +42,7 @@ vnoremap('K', ':m \'<-2<CR>gv=gv')
nnoremap('<Leader>ee', ':NvimTreeFindFileToggle<cr>') nnoremap('<Leader>ee', ':NvimTreeFindFileToggle<cr>')
vnoremap('<Leader>/', ':Commentary<cr>') vnoremap('<Leader>/', ':Commentary<cr>')
nnoremap('<Leader>/', ':Commentary<cr>')
-- golang error handling -- golang error handling
nnoremap('<Leader>err', 'oif err != nil {<CR>return nil, err<CR>}<CR><esc>kkI<esc>') nnoremap('<Leader>err', 'oif err != nil {<CR>return nil, err<CR>}<CR><esc>kkI<esc>')

View File

@@ -49,6 +49,9 @@ require('lspconfig')['tsserver'].setup {
require('lspconfig')['clangd'].setup { require('lspconfig')['clangd'].setup {
on_attach = on_attach, on_attach = on_attach,
capabilities = capabilities, capabilities = capabilities,
-- This is the default list of filetypes excluding proto
-- https://github.com/neovim/nvim-lspconfig/blob/0ef64599b8aa0187ee5f6d92cb39c951f348f041/lua/lspconfig/server_configurations/clangd.lua#L70C5-L70C66
filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' }
} }
require('lspconfig')['rust_analyzer'].setup { require('lspconfig')['rust_analyzer'].setup {
on_attach = on_attach, on_attach = on_attach,
@@ -109,3 +112,7 @@ require('lspconfig')['zls'].setup {
} }
} }
} }
require('lspconfig')['protols'].setup{
on_attach = on_attach,
capabilities = capabilities,
}