FULL LUA! plus some bugfixes
This commit is contained in:
2
nvim/lua/plugins/airline.lua
Normal file
2
nvim/lua/plugins/airline.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
vim.g["airline#extensions#tabline#enabled"] = 1
|
||||
vim.g.airline_powerline_fonts = 1
|
||||
@@ -0,0 +1,26 @@
|
||||
local map = vim.api.nvim_set_keymap
|
||||
|
||||
local noremap = function(ctx, keys, cmd, opts)
|
||||
opts = opts or {}
|
||||
opts['noremap'] = true
|
||||
opts['silent'] = true
|
||||
map(ctx, keys, cmd, opts)
|
||||
end
|
||||
|
||||
local nnoremap = function(keys, cmd)
|
||||
noremap('n', keys, cmd, nil)
|
||||
end
|
||||
local tnoremap = function(keys, cmd)
|
||||
noremap('t', keys, cmd, nil)
|
||||
end
|
||||
|
||||
vim.g.floaterm_wintype = 'split'
|
||||
vim.g.floaterm_height = 0.2
|
||||
nnoremap('<F7>', ':FloatermNew<CR>')
|
||||
tnoremap('<F7>', '<C-\\><C-n>:FloatermNew<CR>')
|
||||
nnoremap('<F8>', ':FloatermPrev<CR>')
|
||||
tnoremap('<F8>', '<C-\\><C-n>:FloatermPrev<CR>')
|
||||
nnoremap('<F9>', ':FloatermNext<CR>')
|
||||
tnoremap('<F9>', '<C-\\><C-n>:FloatermNext<CR>')
|
||||
nnoremap('<F12>', ':FloatermToggle<CR>')
|
||||
tnoremap('<F12>', '<C-\\><C-n>:FloatermToggle<CR>')
|
||||
|
||||
@@ -58,8 +58,10 @@ Plug 'tpope/vim-dispatch'
|
||||
|
||||
vim.call('plug#end')
|
||||
|
||||
require("plugins/airline")
|
||||
require("plugins/floaterm")
|
||||
require("plugins/harpoon")
|
||||
require("plugins/telescope")
|
||||
require("plugins/treesitter")
|
||||
require("plugins/nvim-cmp")
|
||||
require("plugins/vim-go")
|
||||
|
||||
@@ -14,10 +14,8 @@ cmp.setup({
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
-- elseif has_words_before() then
|
||||
-- cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
@@ -25,8 +23,6 @@ cmp.setup({
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
@@ -35,7 +31,7 @@ cmp.setup({
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
['<CR>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
|
||||
8
nvim/lua/plugins/vim-go.lua
Normal file
8
nvim/lua/plugins/vim-go.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
vim.g.go_highlight_fields = 1
|
||||
vim.g.go_highlight_functions = 1
|
||||
vim.g.go_highlight_function_calls = 1
|
||||
vim.g.go_highlight_extra_types = 1
|
||||
vim.g.go_highlight_operators = 1
|
||||
vim.g.go_fmt_autosave = 1
|
||||
vim.g.go_fmt_command = 'goimports'
|
||||
vim.g.go_auto_type_info = 1
|
||||
Reference in New Issue
Block a user