feat: coc improvements, file search improvements

This commit is contained in:
Tine Jozelj 2022-10-06 13:33:37 +02:00
parent 93398b2df2
commit 5f948f88bd
3 changed files with 23 additions and 6 deletions

View file

@ -4,6 +4,7 @@
"git.removedSign.hlGroup": "GitGutterDelete",
"git.topRemovedSign.hlGroup": "GitGutterDelete",
"git.changeRemovedSign.hlGroup": "GitGutterChangeDelete",
"git.addGBlameToVirtualText": true,
"languageserver": {
"terraform": {
"command": "terraform-ls",
@ -22,16 +23,14 @@
"json",
"graphql",
"prisma",
"terraform"
"terraform",
"jsonc"
],
"tsserver.formatOnType": true,
"coc.preferences.formatOnType": true,
"yaml.schemaStore.enable": true,
"yaml.schemas": {
"kubernetes": [
"/**/kubernetes/**/*.yaml",
"/**/k8s/**/*.yaml"
],
"kubernetes": ["/**/kubernetes/**/*.yaml", "/**/k8s/**/*.yaml"],
"https://json.schemastore.org/github-workflow.json": "/.github/workflows/*.yaml"
}
}

View file

@ -44,6 +44,11 @@ let g:coc_global_extensions = [
\ 'coc-prisma',
\ 'coc-sh',
\ 'coc-typos',
\ 'coc-docker',
\ 'coc-go',
\ 'coc-html',
\ 'coc-sql',
\ 'coc-toml',
\ ]
if isdirectory('./node_modules') && isdirectory('./node_modules/prettier')
let g:coc_global_extensions += ['coc-prettier']
@ -156,6 +161,12 @@ require'nvim-treesitter.configs'.setup {
}
EOF
"""""
"--- Custom Configurations
augroup JsonToJsonc
autocmd! FileType json set filetype=jsonc
augroup END
"""""
"--- Telescope Configuration
lua <<EOF
@ -209,6 +220,10 @@ set shortmess+=c
"- Custom commands
command! -nargs=0 Prettier :CocCommand prettier.formatFile
"""""
"- Custom Filetypes
au BufRead,BufNewFile *.mdx setfiletype markdown
"""""
"- Keybindings
" Using SPACE as <leader> key
@ -216,7 +231,7 @@ nnoremap <SPACE> <Nop>
let mapleader = " "
" Telescope
nnoremap <c-p> <cmd>Telescope find_files<cr>
nnoremap <c-p> <cmd>Telescope git_files<cr>
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
" Telescope git

View file

@ -54,6 +54,9 @@ export PATH=$PATH:$HOME/.bin:$HOME/go/bin:/snap/bin
# ENV
export EDITOR=vim
# Nix fix
export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive
# Starship
export STARSHIP_CONFIG=~/.starship.toml
eval "$(starship init zsh)"