From f7af39974146c677495d2b09ffedc051feb266f0 Mon Sep 17 00:00:00 2001 From: kankys Date: Fri, 18 Oct 2024 09:55:21 +0200 Subject: [PATCH] aj init --- README-ENGLISH.md | 3 +- README.md | 1 - init.vim | 7 +- init_English.vim | 233 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 235 insertions(+), 9 deletions(-) create mode 100644 init_English.vim diff --git a/README-ENGLISH.md b/README-ENGLISH.md index 982f679..c810c3a 100644 --- a/README-ENGLISH.md +++ b/README-ENGLISH.md @@ -166,8 +166,7 @@ Windows: ![SAT](https://lukan.cz/wp-content/uploads/2024/03/sat-150x150.jpeg) -### Další projekty a odkazy: +### Other projects and links: * 👉 [ArchLinux CZ](https://arch-linux.cz/) * 👉 [Search web SearXNG CZ](https://searxng.cz/) * 👉 [EndeavourOS Linux](https://endeavouros.cz/) -* 👉 [i3 window manager](https://i3wm.org/) diff --git a/README.md b/README.md index d358ba5..36823cd 100644 --- a/README.md +++ b/README.md @@ -171,4 +171,3 @@ Windows: * 👉 [ArchLinux CZ](https://arch-linux.cz/) * 👉 [Vyhledávač SearXNG CZ](https://searxng.cz/) * 👉 [EndeavourOS Linux](https://endeavouros.cz/) -* 👉 [i3 window manager](https://i3wm.org/) diff --git a/init.vim b/init.vim index da5b1fb..da0b183 100644 --- a/init.vim +++ b/init.vim @@ -19,7 +19,7 @@ imap coc#pum#visible() ? coc#pum#confirm() : "\" Plug 'othree/html5.vim' - Plug 'shellRaining/hlchunk.nvim' " Propojovací line (lua) + Plug 'shellRaining/hlchunk.nvim' " Propojovací lajny v kódu (lua) " Plug 'Exafunction/codeium.vim', { 'branch': 'main' } " Free AI codium @@ -100,11 +100,6 @@ Plug 'kosayoda/nvim-lightbulb' call plug#end() - - " Nastavení klávesy Enter pro potvrzení výběru z vyskakovací nápovědy - nejde - " s autoclose! - inoremap pumvisible() ? "\" : "\" - " Autostart NERDTree " autocmd VimEnter * call NERDTreeFocus() " Autostart NERDTreeFocus diff --git a/init_English.vim b/init_English.vim new file mode 100644 index 0000000..bbbb1af --- /dev/null +++ b/init_English.vim @@ -0,0 +1,233 @@ +set number " displays line numbers +set wrap " breaks the code on the line +set cursorline " highlights the line with the cursor +set noshowmode +set title " displays the name and path of the file +set clipboard=unnamedplus " allow copying and pasting outside Neovim +set signcolumn=number + +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', 'php'] } + +" Adding a keyboard shortcut to confirm the help in the code with the TAB key +imap coc#pum#visible() ? coc#pum#confirm() : "\" + +Plug 'othree/html5.vim' " Support HTML5 + + Plug 'shellRaining/hlchunk.nvim' " Link lines in the code (lua) + +" Plug 'Exafunction/codeium.vim', { 'branch': 'main' } " Free AI codium + +Plug 'm4xshen/autoclose.nvim' " AutocloseTag (lua) + +Plug 'https://github.com/scrooloose/nerdtree' " NERDTree lateral tree panel + +Plug 'neoclide/coc.nvim', {'branch': 'release'} "Coc packages systems + +Plug 'mhinz/vim-startify' " Alternativní start screen + +Plug 'preservim/nerdcommenter' " NERD Commenter - comments code + +Plug 'wakatime/vim-wakatime' " Wakatime + +Plug 'tpope/vim-fugitive' " Git - vim fugitive + +Plug 'lilydjwg/colorizer' " View color css + +Plug 'Pocco81/auto-save.nvim' " Autosave + +Plug 'pangloss/vim-javascript' + + +" Theme +Plug 'dracula/vim', { 'as': 'dracula' } + +Plug 'Tsuzat/NeoSolarized.nvim', { 'branch': 'master' } + +Plug 'bluz71/vim-moonfly-colors', { 'as': 'moonfly' } + +Plug 'ghifarit53/tokyonight-vim' + +Plug 'morhetz/gruvbox' + +Plug 'joshdick/onedark.vim' + +Plug 'sainnhe/sonokai' + +Plug 'sainnhe/edge' + +Plug 'vim-airline/vim-airline' + +Plug 'projekt0n/github-nvim-theme' + +Plug 'bluz71/vim-nightfly-colors', { 'as': 'nightfly' } + +Plug 'xero/miasma.nvim' + +Plug 'sts10/vim-pink-moon' + +Plug 'gilgigilgil/anderson.vim' + +Plug 'jacoborus/tender.vim' + +Plug 'nordtheme/vim' + +" CMP setup + +" LSP +Plug 'neovim/nvim-lspconfig' + +" Autocompletion +Plug 'hrsh7th/nvim-cmp' +Plug 'hrsh7th/cmp-nvim-lsp' +Plug 'hrsh7th/cmp-buffer' +Plug 'hrsh7th/cmp-path' +Plug 'hrsh7th/cmp-cmdline' +Plug 'hrsh7th/cmp-vsnip' +Plug 'hrsh7th/vim-vsnip' + +" LSP Signature +Plug 'ray-x/lsp_signature.nvim' + +" Lightbulb +Plug 'kosayoda/nvim-lightbulb' + +call plug#end() + + + " Autostart NERDTree +" autocmd VimEnter * call NERDTreeFocus() " Autostart NERDTreeFocus + +" Comments NERD Commenter key map Ctrl + k + l +let mapleader="," +nmap NERDCommenterToggle +vmap NERDCommenterToggle + +" Atomaticstart theme +colorscheme dracula +autocmd VimEnter * colorscheme dracula + +" Autosave +let g:auto_save_enabled = 1 +let g:auto_save_delay = 3000 +let g:auto_save_events = ['InsertLeave', 'TextChanged'] + +" keys pretier +vmap f (coc-format-selected) +nmap f (coc-format-selected) + + + +lua <'] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.close(), + [''] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }), + }, + sources = { + { name = 'nvim_lsp' }, + { name = 'vsnip' }, + { name = 'buffer' }, + { name = 'path' }, + }, +} + +-- Use buffer source for `/` +cmp.setup.cmdline('/', { + sources = { + { name = 'buffer' } + } +}) + +-- Use cmdline & path source for ':' +cmp.setup.cmdline(':', { + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }) +}) +EOF + +lua << EOF +-- lsp_signature setup +require'lsp_signature'.setup({ + bind = true, -- This is mandatory, otherwise border config won't get registered. + handler_opts = { + border = "rounded" + } +}) +EOF + +lua << EOF +-- nvim-lightbulb setup +require('nvim-lightbulb').setup({ + autocmd = { enabled = true }, +}) +EOF