Aktualizovat init.vim

This commit is contained in:
Kankys 2024-10-14 06:49:09 +00:00
parent 574cfddb95
commit 94cddad983

114
init.vim
View File

@ -1,48 +1,59 @@
set number set number
set noshowmode
set signcolumn=number
call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged') call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')
"Prettier + setup
" post install (yarn install | npm install) then load plugin only for editing supported files
Plug 'prettier/vim-prettier', {
\ 'do': 'yarn install --frozen-lockfile --production',
\ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'svelte', 'yaml', 'html'] }
" Přidání klávesové zkratky pro potvrzení nápovědy kódu
imap <silent><expr> <TAB> coc#pum#visible() ? coc#pum#confirm() : "\<TAB>"
Plug 'othree/html5.vim' Plug 'othree/html5.vim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
" AutocloseTag Plug 'shellRaining/hlchunk.nvim' " Propojovací line (lua)
Plug 'm4xshen/autoclose.nvim'
" NERDTree postraní panel Plug 'Exafunction/codeium.vim', { 'branch': 'main' } " Free AI codium
Plug 'https://github.com/scrooloose/nerdtree'
"Coc Plug 'm4xshen/autoclose.nvim' " AutocloseTag (lua)
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Tabnine Plug 'https://github.com/scrooloose/nerdtree' " NERDTree postraní panel
Plug 'codota/tabnine-nvim', { 'do': './dl_binaries.sh' }
" Alternativní startovací obrazovka Plug 'neoclide/coc.nvim', {'branch': 'release'} "Coc balíčkovací systém
Plug 'mhinz/vim-startify'
" NERD Commenter Plug 'mhinz/vim-startify' " Alternativní startovací obrazovka
Plug 'preservim/nerdcommenter'
" Wakatime Plug 'preservim/nerdcommenter' " NERD Commenter - komentáře
Plug 'wakatime/vim-wakatime'
" Search plugin s asynchroním vyhledáváním Plug 'wakatime/vim-wakatime' " Wakatime
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
"Spodní lišta Plug 'tpope/vim-fugitive' " Git - vim fugitive
Plug 'itchyny/lightline.vim'
" Autosave Plug 'lewis6991/gitsigns.nvim' " Git Signs (lua) - prohlížení smazaných řádku
Plug 'Pocco81/auto-save.nvim'
" Telescope (lua)
" Telescope requires plenary to function
" Plug 'nvim-lua/plenary.nvim'
" The main Telescope plugin
" Plug 'nvim-telescope/telescope.nvim'
" An optional plugin recommended by Telescope docs
" Plug 'nvim-telescope/telescope-fzf-native.nvim', {'do': 'make' }
" Plug 'ryanoasis/vim-devicons' " Icons
Plug 'lilydjwg/colorizer' " Náhled barev css
Plug 'Pocco81/auto-save.nvim' " Autosave
" Theme " Theme
Plug 'dracula/vim', { 'as': 'dracula' } Plug 'dracula/vim', { 'as': 'dracula' }
Plugin 'NLKNguyen/papercolor-theme'
Plug 'Tsuzat/NeoSolarized.nvim', { 'branch': 'master' } Plug 'Tsuzat/NeoSolarized.nvim', { 'branch': 'master' }
Plug 'bluz71/vim-moonfly-colors', { 'as': 'moonfly' } Plug 'bluz71/vim-moonfly-colors', { 'as': 'moonfly' }
@ -75,55 +86,56 @@ Plug 'nordtheme/vim'
call plug#end() call plug#end()
" Nastavení klávesy Enter pro potvrzení výběru z vyskakovací nápovědy " Nastavení klávesy Enter pro potvrzení výběru z vyskakovací nápovědy - nejde
" inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>" " s autoclose!
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>"
" Autostart NERDTreeFocus " Autostart NERDTree
autocmd VimEnter * call NERDTreeFocus() " autocmd VimEnter * call NERDTreeFocus() " Autostart NERDTreeFocus
" Komentáře NERD Commenter klávesové zkratky " Komentáře NERD Commenter klávesové zkratky Ctrl + k + l
let mapleader="," let mapleader=","
nmap <C-k> <plug>NERDCommenterToggle nmap <C-k> <plug>NERDCommenterToggle
vmap <C-l> <plug>NERDCommenterToggle<CR> vmap <C-l> <plug>NERDCommenterToggle<CR>
" Atomaticky po startu theme " Atomaticky po startu theme
colorscheme dracula colorscheme nightfly
autocmd VimEnter * colorscheme dracula autocmd VimEnter * colorscheme nightfly
" Autosave " Autosave
let g:auto_save_enabled = 1 let g:auto_save_enabled = 1
let g:auto_save_delay = 3000 let g:auto_save_delay = 3000
let g:auto_save_events = ['InsertLeave', 'TextChanged'] let g:auto_save_events = ['InsertLeave', 'TextChanged']
" keys pretier
" Nastavení Prettieru vmap <leader>f <Plug>(coc-format-selected)
command! -nargs=0 Prettier :CocCommand prettier.forceFormatDocument nmap <leader>f <Plug>(coc-format-selected)
let g:prettier#autoformat = 1
let g:prettier#autoformat_require_pragma = 1
let g:prettier#autoformat_config_files = ['prettier.config.js', '.prettierrc', '.prettierrc.json', '.prettierrc.yml', '.prettierrc.yaml', '.prettierrc.json5', '.prettierrc.js', '.prettierrc.cjs', '.prettierrc.toml', '.prettierrc.jsonc', '.prettierrc.html']
lua <<EOF lua <<EOF
--Tabnine setup ( Tabnine PRO)
require('tabnine').setup({
disable_auto_comment=true,
accept_keymap="<Tab>",
dismiss_keymap = "<C-]>",
debounce_ms = 800,
suggestion_color = {gui = "#808080", cterm = 244},
exclude_filetypes = {"TelescopePrompt", "NvimTree"},
log_file_path = nil, -- absolute path to Tabnine log file
})
--AutocloseTag setup --AutocloseTag setup
require("autoclose").setup() require("autoclose").setup()
--Line
require('hlchunk').setup({
indent = {
chars = {
"│",
},
style = {
"#FF0000",
"#FF7F00",
"#FFFF00",
"#00FF00",
"#00FFFF",
"#0000FF",
"#8B00FF",
},
}
})
EOF EOF