Browse Source

update settings

master
Marcel Schneider 2 years ago
parent
commit
1fa354c839
No known key found for this signature in database GPG Key ID: 86027C59718EEE88
  1. 24
      init.vim
  2. 55
      vim/ftplugin/javascript.vim
  3. 1
      zsh/aliases.zsh

24
init.vim

@ -35,6 +35,7 @@ Plug 'nvim-treesitter/nvim-treesitter-textobjects'
Plug 'kyazdani42/nvim-web-devicons' " Icons...
Plug 'mfussenegger/nvim-dap', { 'for': ['typescript', 'javascript', 'python', 'rust'] }
Plug 'lbrayner/vim-rzip' " recursive zip support, needed for yarn pnp
Plug 'kkoomen/vim-doge', { 'do': { -> doge#install() } }
" telescope. Needed for octo.nvim, might replace fzf
Plug 'nvim-lua/popup.nvim'
@ -71,7 +72,6 @@ Plug 'jvanja/vim-bootstrap4-snippets', { 'for': ['html', 'blade'] }
" JavaScript{{{
Plug 'gavocanov/vim-js-indent', { 'for': [ 'javascript' ]} " JavaScript indent support
Plug 'heavenshell/vim-jsdoc', { 'for': [ 'javascript', 'typescript', 'vue' ], 'do': 'make install'} " Generate JSDoc comments
Plug 'posva/vim-vue', { 'for': [ 'javascript', 'html', 'vue' ] } " vue.js integration
Plug 'kevinoid/vim-jsonc'
"}}}
@ -114,6 +114,10 @@ Plug 'heavenshell/vim-pydocstring', { 'for': ['python'], 'do': 'make install' }
Plug 'anntzer/vim-cython', { 'for': ['python']}
"}}}
"{{{ CSV
Plug 'chrisbra/csv.vim', { 'for': 'csv' }
"}}}
" All of your Plugins must be added before the following line
call plug#end() " required
filetype plugin indent on " required
@ -240,6 +244,7 @@ nnoremap <leader>tn :tabnew<cr>
nnoremap <F3> :Git<cr>
nnoremap <F4> :Git push<cr>
"}}}
" {{{ Textobjects
@ -260,12 +265,12 @@ require'nvim-treesitter.configs'.setup {
["ic"] = "@class.inner",
-- Or you can define your own textobjects like this
["iF"] = {
python = "(function_definition) @function",
cpp = "(function_definition) @function",
c = "(function_definition) @function",
java = "(method_declaration) @function",
},
-- ["iF"] = {
-- python = "(function_definition) @function",
-- cpp = "(function_definition) @function",
-- c = "(function_definition) @function",
-- java = "(method_declaration) @function",
-- },
},
},
},
@ -493,5 +498,10 @@ require('telescope').load_extension('fzf')
EOF
"}}}
" doge settings
let g:doge_javascript_settings = {
\ 'omit_redundant_param_types': 1,
\}
let g:doge_doc_standard_python = 'google'
"}}}

55
vim/ftplugin/javascript.vim

@ -2,14 +2,13 @@ let b:ale_fixers = {}
let b:ale_fixers['javascript'] = ['prettier']
let b:ale_fixers['typescript'] = ['prettier']
let b:ale_fixers['json'] = ['eslint']
"let b:ale_javascript_prettier_options = '--no-semi --single-quote --tab-width 2'
"let b:ale_typescript_prettier_options = '--no-semi --single-quote --tab-width 2'
let b:ale_javascript_prettier_options = '--tab-width 4'
let b:ale_typescript_prettier_options = '--tab-width 4'
let b:ale_fixers['vue'] = ['prettier']
let b:ale_vue_prettier_options = '--no-semi --single-quote'
let b:ale_fix_on_save = 1
let b:ale_javascript_prettier_use_local_config = 1
let b:ale_typescript_prettier_use_local_config = 1
let b:ale_fix_on_save = 0
" config for local eslint
g:ale_javascript_eslint_use_global = 1
g:ale_javascript_eslint_executable = 'yarn'
@ -30,34 +29,32 @@ setlocal wildignore+=node_modules
setlocal tabstop=4
setlocal shiftwidth=4
" Create jsdoc with ,h
nnoremap <leader><C-i> :JsDoc<CR>
nnoremap <F8> Biawait <ESC>A
nnoremap <F2> :Prettier<CR>
lua <<EOF
require'nvim-treesitter.configs'.setup {
textobjects = {
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]m"] = "@function.outer",
["]]"] = "@class.outer",
},
goto_next_end = {
["]M"] = "@function.outer",
["]["] = "@class.outer",
},
goto_previous_start = {
["[m"] = "@function.outer",
["[["] = "@class.outer",
},
goto_previous_end = {
["[M"] = "@function.outer",
["[]"] = "@class.outer",
},
},
},
}
-- require'nvim-treesitter.configs'.setup {
-- textobjects = {
-- move = {
-- enable = true,
-- set_jumps = true, -- whether to set jumps in the jumplist
-- goto_next_start = {
-- ["]m"] = "@function.outer",
-- ["]]"] = "@class.outer",
-- },
-- goto_next_end = {
-- ["]M"] = "@function.outer",
-- ["]["] = "@class.outer",
-- },
-- goto_previous_start = {
-- ["[m"] = "@function.outer",
-- ["[["] = "@class.outer",
-- },
-- goto_previous_end = {
-- ["[M"] = "@function.outer",
-- ["[]"] = "@class.outer",
-- },
-- },
-- },
-- }
EOF

1
zsh/aliases.zsh

@ -18,6 +18,7 @@ alias ga='git add '
alias gc1='git clone --depth 1 '
alias gco='git checkout '
alias gpt='git push && git push --tags'
alias gla='git log --graph --decorate --oneline --all'
#}}}
alias mem='cd /dev/shm'

Loading…
Cancel
Save