snippet stream

This commit is contained in:
Chris 2021-03-19 22:35:58 -04:00
parent fa6fa14149
commit d97766b0a7
8 changed files with 43 additions and 27 deletions

View file

@ -76,20 +76,23 @@ To use vim-gists you will need to configure the following:
git config --global github.user <username> git config --global github.user <username>
``` ```
## Snippets
If you are looking for snippets checkout this github topic: [Snippet Topic](https://github.com/topics/vscode-snippets)
## TODO ## TODO
**HIGH PRIORITY** **HIGH PRIORITY**
- lsp kind for snippets
- list all binaries needed for functionality - list all binaries needed for functionality
- learn what opt is - learn what opt is
- learn nvim-dap in depth - learn nvim-dap in depth
- snippet support
- for vsnip :h vim-vsnip, also figure out what integr does
- add utf8 line col and spaces (maybe blame) - add utf8 line col and spaces (maybe blame)
- potentially switch to dashboard - potentially switch to dashboard
- update Vista symbols - update Vista symbols
- vim ult test
**LOW PRIORITY** **LOW PRIORITY**
- configure nvim-peekup
- better install script, support both nvim and nvcode paths - better install script, support both nvim and nvcode paths
- make java code actions prettier - make java code actions prettier
- figure out how to customize java formatting - figure out how to customize java formatting
@ -100,6 +103,7 @@ git config --global github.user <username>
- look into autoinstall lsp - look into autoinstall lsp
- json config file (luajson) - json config file (luajson)
- get logo - get logo
- configure nvim-peekup
- configure neogit - configure neogit
- toggle virtual text diagnostics - toggle virtual text diagnostics
- move language servers not installed with npm to neovim local share location - move language servers not installed with npm to neovim local share location

View file

@ -17,6 +17,7 @@ else
require('nv-nvimtree') require('nv-nvimtree')
require('nv-treesitter') require('nv-treesitter')
require('nv-barbar') require('nv-barbar')
require('nv-emmet')
require('nv-quickscope') require('nv-quickscope')
require('nv-gitsigns') require('nv-gitsigns')
require('nv-nvim-autopairs') require('nv-nvim-autopairs')

View file

@ -59,12 +59,11 @@ vim.cmd('inoremap <expr> <c-k> (\"\\<C-p>\")')
-- vim.cmd('inoremap <expr> <TAB> (\"\\<C-n>\")') -- vim.cmd('inoremap <expr> <TAB> (\"\\<C-n>\")')
-- vim.cmd('inoremap <expr> <S-TAB> (\"\\<C-p>\")') -- vim.cmd('inoremap <expr> <S-TAB> (\"\\<C-p>\")')
-- TAB Complete -- vim.api.nvim_set_keymap('i', '<C-TAB>', 'compe#complete()', {noremap = true, silent = true, expr = true})
-- vim.api.nvim_set_keymap('i', '<expr><TAB>', 'pumvisible() ? \"\\<C-n>\" : \"\\<TAB>\"', { noremap = true, silent = true })
vim.cmd([[ -- vim.cmd([[
map p <Plug>(miniyank-autoput) -- map p <Plug>(miniyank-autoput)
map P <Plug>(miniyank-autoPut) -- map P <Plug>(miniyank-autoPut)
map <leader>n <Plug>(miniyank-cycle) -- map <leader>n <Plug>(miniyank-cycle)
map <leader>N <Plug>(miniyank-cycleback) -- map <leader>N <Plug>(miniyank-cycleback)
]]) -- ]])

View file

@ -1,4 +1,7 @@
-- npm i -g pyright -- npm i -g pyright
-- local capabilities = vim.lsp.protocol.make_client_capabilities()
-- capabilities.textDocument.completion.completionItem.snippetSupport = true
require'lspconfig'.pyright.setup{ require'lspconfig'.pyright.setup{
on_attach = require'lsp'.common_on_attach, on_attach = require'lsp'.common_on_attach,
-- capabilities = capabilities
} }

3
lua/nv-emmet/init.lua Normal file
View file

@ -0,0 +1,3 @@
-- After you have what you want press C-Y and , at the same time
-- autocmd FileType html,css EmmetInstall
-- vim.g.user_emmet_leader_key='<C-Z>'

View file

@ -1,10 +1,8 @@
vim.g.startify_custom_header = { vim.g.startify_custom_header = {
' _ ___ ________ __ ', ' _ ___ ________ __ ', ' / | / / | / / ____/___ ____/ /__ ',
' / | / / | / / ____/___ ____/ /__ ', ' / |/ /| | / / / / __ \\/ __ / _ \\', ' / /| / | |/ / /___/ /_/ / /_/ / __/',
' / |/ /| | / / / / __ \\/ __ / _ \\', ' /_/ |_/ |___/\\____/\\____/\\__,_/\\___/ '
' / /| / | |/ / /___/ /_/ / /_/ / __/', }
' /_/ |_/ |___/\\____/\\____/\\__,_/\\___/ ',
}
vim.g.webdevicons_enable_startify = 1 vim.g.webdevicons_enable_startify = 1
vim.g.startify_enable_special = 0 vim.g.startify_enable_special = 0
@ -16,10 +14,13 @@ vim.g.startify_fortune_use_unicode = 1
vim.g.startify_session_persistence = 1 vim.g.startify_session_persistence = 1
vim.g.startify_session_dir = '~/.config/nvim/session' vim.g.startify_session_dir = '~/.config/nvim/session'
vim.api.nvim_exec(
'let startify_lists = [ { \'type\': \'files\', \'header\': [\' Files\'] }, { \'type\': \'sessions\', \'header\': [\' Sessions\'] }, { \'type\': \'bookmarks\', \'header\': [\' Bookmarks\'] }, ]',
true)
vim.api.nvim_exec('let startify_lists = [ { \'type\': \'files\', \'header\': [\' Files\'] }, { \'type\': \'sessions\', \'header\': [\' Sessions\'] }, { \'type\': \'bookmarks\', \'header\': [\' Bookmarks\'] }, ]',true) vim.api.nvim_exec(
'let startify_bookmarks = [ { \'b\': \'~/Blog\' }, { \'i\': \'~/.config/nvim/init.lua\' }, { \'z\': \'~/.zshrc\' }, { \'r\': \'.config/nvim/README.md\' }]',
vim.api.nvim_exec('let startify_bookmarks = [ { \'b\': \'~/Blog\' }, { \'i\': \'~/.config/nvim/init.vim\' }, { \'z\': \'~/.zshrc\' }]', true) true)
vim.cmd([[ vim.cmd([[
function! StartifyEntryFormat() function! StartifyEntryFormat()

View file

@ -31,7 +31,8 @@ nv_utils.define_augroups({
{'BufNewFile', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'}, {'BufNewFile', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'},
{'FileType', 'java', 'luafile ~/.config/nvim/lua/lsp/java-ls.lua'}, {'FileType', 'java', 'luafile ~/.config/nvim/lua/lsp/java-ls.lua'},
{'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'}, {'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'},
{'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'} {'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'},
{'FileType', 'markdown', 'set wrap'}
-- {'User', 'GoyoLeave', 'lua require(\'galaxyline\').disable_galaxyline()'}, -- {'User', 'GoyoLeave', 'lua require(\'galaxyline\').disable_galaxyline()'},
-- {'User', 'GoyoEnter', 'lua require(\'galaxyline\').galaxyline_augroup()'}, -- {'User', 'GoyoEnter', 'lua require(\'galaxyline\').galaxyline_augroup()'},
} }

View file

@ -34,15 +34,19 @@ return require('packer').startup(function(use)
-- Autocomplete -- Autocomplete
use 'hrsh7th/nvim-compe' use 'hrsh7th/nvim-compe'
use 'christianchiarulli/emmet-vim'
use 'hrsh7th/vim-vsnip' use 'hrsh7th/vim-vsnip'
use 'hrsh7th/vim-vsnip-integ' use 'xabikos/vscode-javascript'
use 'honza/vim-snippets' use 'cstrap/python-snippets'
use 'dsznajder/vscode-es7-javascript-react-snippets'
use 'golang/vscode-go'
use 'rust-lang/vscode-rust'
use 'ChristianChiarulli/html-snippets'
-- use 'hrsh7th/vim-vsnip-integ'
-- use 'honza/vim-snippets'
-- use 'abusaidm/html-snippets' -- <- don't work
-- use 'epilande/vim-react-snippets' -- use 'epilande/vim-react-snippets'
-- use 'xabikos/vscode-javascript'
-- use 'cstrap/python-snippets'
-- use 'ylcnfrht/vscode-python-snippet-pack' -- use 'ylcnfrht/vscode-python-snippet-pack'
-- use 'golang/vscode-go'
-- use 'rust-lang/vscode-rust'
-- use 'SirVer/ultisnips' -- use 'SirVer/ultisnips'
-- use 'norcalli/snippets.nvim' -- use 'norcalli/snippets.nvim'