mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 08:55:16 -06:00
bugfixes
This commit is contained in:
parent
b0cd1f6bb8
commit
4ceceff9bf
7 changed files with 22 additions and 30 deletions
|
|
@ -1,9 +1,8 @@
|
|||
vim.opt.backspace = 'indent,eol,start'
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
vim.opt.completeopt = 'menuone'
|
||||
vim.opt.completeopt = {'menu', 'menuone', 'noselect'}
|
||||
vim.opt.expandtab = true -- insert tabs as spaces
|
||||
vim.opt.inccommand = 'split' -- incremental live completion
|
||||
vim.opt.laststatus = 1
|
||||
vim.opt.list = true
|
||||
vim.opt.nrformats:append('alpha') -- let Ctrl-a do letters as well
|
||||
vim.opt.path:append('**') -- enable fuzzy :find ing
|
||||
|
|
|
|||
|
|
@ -19,22 +19,21 @@ return {
|
|||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
experimental = {
|
||||
native_menu = false,
|
||||
ghost_text = true,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
['<C-j>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-k>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<esc>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm { select = true }, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-n>'] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert },
|
||||
['<C-p>'] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert },
|
||||
['<C-Space>'] = cmp.mapping.confirm {
|
||||
select = true,
|
||||
behavior = cmp.SelectBehavior.Insert
|
||||
},
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'nvim_lsp', keyword_length = 1 },
|
||||
{ name = 'luasnip' },
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
}),
|
||||
}
|
||||
|
||||
|
|
@ -68,13 +67,13 @@ return {
|
|||
}
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
|
||||
vim.keymap.set({ 'i', 's' }, '<C-K>', function()
|
||||
vim.keymap.set({ 'i', 's' }, '<C-J>', function()
|
||||
if ls.expand_or_jumpable() then
|
||||
ls.expand_or_jump()
|
||||
end
|
||||
end, { silent = true })
|
||||
|
||||
vim.keymap.set({ 'i', 's' }, '<C-J>', function()
|
||||
vim.keymap.set({ 'i', 's' }, '<C-K>', function()
|
||||
if ls.jumpable(-1) then
|
||||
ls.jump(-1)
|
||||
end
|
||||
|
|
@ -85,14 +84,6 @@ return {
|
|||
ls.change_choice(1)
|
||||
end
|
||||
end, { silent = true })
|
||||
|
||||
--------------------
|
||||
-- Snippets --
|
||||
--------------------
|
||||
local fmta = require('luasnip.extras.fmt').fmta
|
||||
ls.add_snippets('go', {
|
||||
ls.snippet('ie', fmta('if err != nil {\n\treturn <err>\n}', { err = ls.insert_node(1, 'err') })),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ return {
|
|||
}
|
||||
lspconfig.jedi_language_server.setup {}
|
||||
lspconfig.nil_ls.setup {}
|
||||
lspconfig.phpactor.setup {}
|
||||
lspconfig.lua_ls.setup {
|
||||
on_init = function(client)
|
||||
local path = client.workspace_folders[1].name
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
{
|
||||
'echasnovski/mini.nvim',
|
||||
event = "VeryLazy",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('mini.ai').setup()
|
||||
require('mini.comment').setup()
|
||||
|
|
@ -28,6 +28,7 @@ return {
|
|||
return summary
|
||||
end
|
||||
local diagnostics = MiniStatusline.section_diagnostics { trunc_width = 75 }
|
||||
local lsp = MiniStatusline.section_lsp { trunc_width = 75 }
|
||||
local filename = MiniStatusline.section_filename { trunc_width = 140 }
|
||||
local search = MiniStatusline.section_searchcount { trunc_width = 75 }
|
||||
|
||||
|
|
@ -36,7 +37,7 @@ return {
|
|||
'%<', -- Mark general truncate point
|
||||
{ hl = 'MiniStatuslineFilename', strings = { filename } },
|
||||
'%=', -- End left alignment
|
||||
{ hl = 'MiniStatusDevinfo', strings = { git(), diff(), diagnostics } },
|
||||
{ hl = 'MiniStatusDevinfo', strings = { git(), diff(), diagnostics, lsp} },
|
||||
{ hl = mode_hl, strings = { search } },
|
||||
}
|
||||
end,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ return {
|
|||
},
|
||||
{
|
||||
'OXY2DEV/markview.nvim',
|
||||
lazy = false,
|
||||
event = 'VeryLazy',
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-tree/nvim-web-devicons"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
event = 'VeryLazy',
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter-context',
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue