Many changes to nvim configs
- switch to nvim-cmp - add lsp-status stuff to statusline
This commit is contained in:
@@ -18,8 +18,11 @@ augroup AutoSaveGroup
|
||||
autocmd BufWinLeave,BufLeave,BufWritePost,BufHidden,QuitPre ?* nested silent! mkview!
|
||||
autocmd BufWinEnter ?* silent! loadview
|
||||
augroup end
|
||||
au BufNewFile,BufRead,BufReadPost *.html.tera set syntax=HTML
|
||||
]], false)
|
||||
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
vim.o.timeoutlen = 700
|
||||
vim.o.guifont='Hasklug Nerd Font Mono,Hack Nerd Font,NotoEmoji Nerd Font'
|
||||
|
||||
@@ -49,6 +52,7 @@ vim.wo.signcolumn='yes'
|
||||
vim.g.dashboard_default_executive = 'fzf'
|
||||
vim.g.python_highlight_all = 1
|
||||
|
||||
|
||||
vim.g.test = {
|
||||
default = {
|
||||
default = {
|
||||
@@ -60,3 +64,55 @@ vim.g.test = {
|
||||
},
|
||||
rust = { { complete_items = {'ts'} } },
|
||||
}
|
||||
|
||||
|
||||
-- Temp
|
||||
|
||||
vim.o.completeopt = 'menuone,noselect'
|
||||
|
||||
-- -- luasnip setup
|
||||
-- local luasnip = require 'luasnip'
|
||||
|
||||
-- -- nvim-cmp setup
|
||||
-- local cmp = require 'cmp'
|
||||
-- cmp.setup {
|
||||
-- snippet = {
|
||||
-- expand = function(args)
|
||||
-- require('luasnip').lsp_expand(args.body)
|
||||
-- end,
|
||||
-- },
|
||||
-- mapping = {
|
||||
-- ['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
-- ['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
-- ['<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,
|
||||
-- },
|
||||
-- ['<Tab>'] = function(fallback)
|
||||
-- if cmp.visible() then
|
||||
-- cmp.select_next_item()
|
||||
-- elseif luasnip.expand_or_jumpable() then
|
||||
-- luasnip.expand_or_jump()
|
||||
-- else
|
||||
-- fallback()
|
||||
-- end
|
||||
-- end,
|
||||
-- ['<S-Tab>'] = function(fallback)
|
||||
-- if cmp.visible() then
|
||||
-- cmp.select_prev_item()
|
||||
-- elseif luasnip.jumpable(-1) then
|
||||
-- luasnip.jump(-1)
|
||||
-- else
|
||||
-- fallback()
|
||||
-- end
|
||||
-- end,
|
||||
-- },
|
||||
-- sources = {
|
||||
-- { name = 'nvim_lsp' },
|
||||
-- { name = 'luasnip' },
|
||||
-- },
|
||||
-- }
|
||||
|
||||
Reference in New Issue
Block a user