Chris пре 4 година
родитељ
комит
d97766b0a7
8 измењених фајлова са 43 додато и 27 уклоњено
  1. 7 3
      README.md
  2. 1 0
      init.lua
  3. 7 8
      lua/keymappings.lua
  4. 3 0
      lua/lsp/python-ls.lua
  5. 3 0
      lua/nv-emmet/init.lua
  6. 10 9
      lua/nv-startify/init.lua
  7. 2 1
      lua/nv-utils/init.lua
  8. 10 6
      lua/plugins.lua

+ 7 - 3
README.md

@@ -76,20 +76,23 @@ To use vim-gists you will need to configure the following:
 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
 
 **HIGH PRIORITY**
+- lsp kind for snippets
 - list all binaries needed for functionality
 - learn what opt is
 - 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)
 - potentially switch to dashboard
 - update Vista symbols
+- vim ult test
 
 **LOW PRIORITY**
-- configure nvim-peekup
 - better install script, support both nvim and nvcode paths
 - make java code actions prettier
 - figure out how to customize java formatting
@@ -100,6 +103,7 @@ git config --global github.user <username>
 - look into autoinstall lsp
 - json config file (luajson)
 - get logo
+- configure nvim-peekup
 - configure neogit
 - toggle virtual text diagnostics
 - move language servers not installed with npm to neovim local share location

+ 1 - 0
init.lua

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

+ 7 - 8
lua/keymappings.lua

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

+ 3 - 0
lua/lsp/python-ls.lua

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

+ 3 - 0
lua/nv-emmet/init.lua

@@ -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>'

+ 10 - 9
lua/nv-startify/init.lua

@@ -1,10 +1,8 @@
 vim.g.startify_custom_header = {
-        '        _   ___    ________          __   ',
-        '       / | / / |  / / ____/___  ____/ /__ ',
-        '      /  |/ /| | / / /   / __ \\/ __  / _ \\',
-        '     / /|  / | |/ / /___/ /_/ / /_/ /  __/',
-        '    /_/ |_/  |___/\\____/\\____/\\__,_/\\___/ ',
-        }
+    '        _   ___    ________          __   ', '       / | / / |  / / ____/___  ____/ /__ ',
+    '      /  |/ /| | / / /   / __ \\/ __  / _ \\', '     / /|  / | |/ / /___/ /_/ / /_/ /  __/',
+    '    /_/ |_/  |___/\\____/\\____/\\__,_/\\___/ '
+}
 
 vim.g.webdevicons_enable_startify = 1
 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_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.vim\' }, { \'z\': \'~/.zshrc\' }]', true)
+vim.api.nvim_exec(
+    'let startify_bookmarks = [ { \'b\': \'~/Blog\' }, { \'i\': \'~/.config/nvim/init.lua\' }, { \'z\': \'~/.zshrc\' }, { \'r\': \'.config/nvim/README.md\' }]',
+    true)
 
 vim.cmd([[
 function! StartifyEntryFormat()

+ 2 - 1
lua/nv-utils/init.lua

@@ -31,7 +31,8 @@ nv_utils.define_augroups({
         {'BufNewFile', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'},
         {'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', 'markdown', 'set wrap'}
         -- {'User', 'GoyoLeave', 'lua require(\'galaxyline\').disable_galaxyline()'},
         -- {'User', 'GoyoEnter', 'lua require(\'galaxyline\').galaxyline_augroup()'},
     }

+ 10 - 6
lua/plugins.lua

@@ -34,15 +34,19 @@ return require('packer').startup(function(use)
 
     -- Autocomplete
     use 'hrsh7th/nvim-compe'
+    use 'christianchiarulli/emmet-vim'
     use 'hrsh7th/vim-vsnip'
-    use 'hrsh7th/vim-vsnip-integ'
-    use 'honza/vim-snippets'
+    use 'xabikos/vscode-javascript'
+    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 'xabikos/vscode-javascript'
-    -- use 'cstrap/python-snippets'
     -- use 'ylcnfrht/vscode-python-snippet-pack'
-    -- use 'golang/vscode-go'
-    -- use 'rust-lang/vscode-rust'
     -- use 'SirVer/ultisnips'
     -- use 'norcalli/snippets.nvim'