update init.vim, update logo, update link

This commit is contained in:
kankys 2024-10-15 20:06:54 +02:00
parent e33ea07580
commit 964a21749d
3 changed files with 111 additions and 13 deletions

View File

@ -1,7 +1,7 @@
# Lite 🚀 ApolloNvim Distro 2024 - Front-End Power
#### Verze: 24.10
#### Link: [🚀 ApolloNvim](https://git.archoslinux.cz/kankys/ApolloNvim)
![ApolloNvim](https://lukan.cz/wp-content/uploads/2024/03/neovim__1_.png)
#### Link: [🚀 ApolloNvim](https://git.arch-linux.cz/kankys/ApolloNvim)
![ApolloNvim](./img/neovim.jpeg)
# Programování je mnohem zábavnější, když jste efektivní. Neovim vás tam může časem dostat, ale musíte být ochotni zkoušet nové věci. Nové pluginy, nové remapy atd.
## Úvod:
* **Vždy se podívej před instalací nových pluginu, na dokumentaci k plaginům na Githubu. Předejdeš tím případným problémům! Pokud si nejsi jistý postupem nebo ti není něco jasné, tak raději se podívej do dokumentace,napiš nám nebo na fórech najdeš odpověď. Táke si vše vždy před změnou zálohuj!**

BIN
img/neovim.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

120
init.vim
View File

@ -8,15 +8,13 @@ call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')
" 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'] }
\ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'svelte', 'yaml', 'html', 'php'] }
" 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 'ray-x/lsp_signature.nvim' " Zobrazí parametry a další informace
Plug 'shellRaining/hlchunk.nvim' " Propojovací line (lua)
" Plug 'Exafunction/codeium.vim', { 'branch': 'main' } " Free AI codium
@ -41,6 +39,9 @@ Plug 'lilydjwg/colorizer' " Náhled barev css
Plug 'Pocco81/auto-save.nvim' " Autosave
" Theme
Plug 'dracula/vim', { 'as': 'dracula' }
@ -74,6 +75,26 @@ 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()
@ -91,8 +112,8 @@ nmap <C-k> <plug>NERDCommenterToggle
vmap <C-l> <plug>NERDCommenterToggle<CR>
" Atomaticky po startu theme
colorscheme nightfly
autocmd VimEnter * colorscheme nightfly
colorscheme dracula
autocmd VimEnter * colorscheme dracula
" Autosave
let g:auto_save_enabled = 1
@ -107,12 +128,7 @@ nmap <leader>f <Plug>(coc-format-selected)
lua <<EOF
require'lsp_signature'.setup({
bind = true, -- This is mandatory, otherwise border config won't get registered.
handler_opts = {
border = "rounded"
}
})
--AutocloseTag setup
require("autoclose").setup()
@ -135,4 +151,86 @@ require('hlchunk').setup({
}
})
EOF
lua << EOF
-- LSP setup
local nvim_lsp = require('lspconfig')
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
local servers = { 'pyright', 'tsserver', 'clangd', 'sumneko_lua' }
for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup {
capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
}
end
EOF
lua << EOF
-- nvim-cmp setup
local cmp = require 'cmp'
cmp.setup {
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
mapping = {
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = 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