mirror of
https://github.com/halfdan/dotfiles.git
synced 2025-09-11 04:06:23 +00:00
Major update
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
local cmp = require'cmp'
|
||||
local lspkind = require('lspkind')
|
||||
local luasnip = require 'luasnip'
|
||||
|
||||
local source_mapping = {
|
||||
buffer = "[Buffer]",
|
||||
@@ -19,18 +20,50 @@ cmp.setup({
|
||||
-- -- require'snippy'.expand_snippet(args.body) -- For `snippy` users.
|
||||
-- end,
|
||||
-- },
|
||||
--mapping = {
|
||||
--['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
|
||||
--['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
|
||||
--['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
|
||||
--['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
--},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require'luasnip'.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
|
||||
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
|
||||
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<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 = cmp.config.sources({
|
||||
{ name = 'cmp_tabnine' },
|
||||
{ name = 'nvim_lsp' },
|
||||
},
|
||||
{
|
||||
{ name = 'buffer' },
|
||||
{ name = 'cmp_tabnine' },
|
||||
{ name = 'nvim_lsp' },
|
||||
}),
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
@@ -74,7 +107,7 @@ tabnine:setup({
|
||||
snippet_placeholder = '..';
|
||||
ignored_file_types = { -- default is not to ignore
|
||||
-- uncomment to ignore in lua:
|
||||
-- lua = true
|
||||
lua = true
|
||||
};
|
||||
})
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
require'lualine'.setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'dracula',
|
||||
theme = 'auto',
|
||||
--component_separators = {'', ''},
|
||||
--section_separators = {'', ''},
|
||||
disabled_filetypes = {}
|
||||
@@ -9,7 +9,7 @@ require'lualine'.setup {
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch'},
|
||||
lualine_c = {'filename', require'lsp-status'.status},
|
||||
lualine_c = { 'filename', 'data', "require'lsp-status'.status()" },
|
||||
lualine_x = {'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
|
@@ -2,4 +2,7 @@ vim.cmd([[
|
||||
let g:sneak#label = 1
|
||||
let g:sneak#prompt = '🔎'
|
||||
let g:sneak#s_next = 1
|
||||
|
||||
let test#strategy = "neovim"
|
||||
let test#neovim#term_position = "vert rightbelow 50"
|
||||
]])
|
||||
|
@@ -19,7 +19,7 @@ require('telescope').setup {
|
||||
file_ignore_patterns = {},
|
||||
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
|
||||
shorten_path = true,
|
||||
winblend = 0,
|
||||
winblend = 0,
|
||||
width = 0.75,
|
||||
preview_cutoff = 120,
|
||||
results_height = 1,
|
||||
@@ -32,7 +32,7 @@ require('telescope').setup {
|
||||
file_previewer = require'telescope.previewers'.vim_buffer_cat.new,
|
||||
grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new,
|
||||
qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new,
|
||||
|
||||
layout_strategy = "horizontal",
|
||||
-- Developer configurations: Not meant for general override
|
||||
buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker,
|
||||
mappings = {
|
||||
|
Reference in New Issue
Block a user