feat: add tabline, filetree, autopairs
parent
d891f4ac5a
commit
4b150dbc0d
@ -0,0 +1,15 @@
|
|||||||
|
return {
|
||||||
|
"windwp/nvim-autopairs",
|
||||||
|
-- Optional dependency
|
||||||
|
dependencies = { 'hrsh7th/nvim-cmp' },
|
||||||
|
config = function()
|
||||||
|
require("nvim-autopairs").setup {}
|
||||||
|
-- If you want to automatically add `(` after selecting a function or method
|
||||||
|
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||||
|
local cmp = require('cmp')
|
||||||
|
cmp.event:on(
|
||||||
|
'confirm_done',
|
||||||
|
cmp_autopairs.on_confirm_done()
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
return {
|
||||||
|
"nvim-web-devicons",
|
||||||
|
config = function ()
|
||||||
|
require 'nvim-web-devicons'.setup {
|
||||||
|
override = {
|
||||||
|
zsh = {
|
||||||
|
icon = "",
|
||||||
|
color = "#428850",
|
||||||
|
cterm_color = "65",
|
||||||
|
name = "Zsh"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
color_icons = true,
|
||||||
|
default = true,
|
||||||
|
strict = true,
|
||||||
|
override_by_filename = {
|
||||||
|
[".gitignore"] = {
|
||||||
|
icon = "",
|
||||||
|
color = "#f1502f",
|
||||||
|
name = "Gitignore"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
override_by_extension = {
|
||||||
|
["log"] = {
|
||||||
|
icon = "",
|
||||||
|
color = "#81e043",
|
||||||
|
name = "Log"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
|
||||||
|
|
||||||
|
return {
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
version = "*",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
config = function ()
|
||||||
|
require('neo-tree').setup {
|
||||||
|
window = {
|
||||||
|
width = 30,
|
||||||
|
mappings = {
|
||||||
|
["o"] = "open",
|
||||||
|
["sv"] = "open_vsplit",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vim.keymap.set('n', '<leader>sn', ':Neotree filesystem reveal float git_status<CR>', { noremap = true, silent = true })
|
||||||
|
end,
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
local custom_onedark = require 'lualine.themes.onedark_dark'
|
||||||
|
custom_onedark.normal.c.bg = '#000000'
|
||||||
|
|
||||||
|
return {
|
||||||
|
-- Set lualine as statusline
|
||||||
|
'nvim-lualine/lualine.nvim',
|
||||||
|
-- See `:help lualine.txt`
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
icons_enabled = true,
|
||||||
|
theme = custom_onedark,
|
||||||
|
section_separators = { left = '', right = '' },
|
||||||
|
component_separators = { left = '', right = '' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
return {
|
||||||
|
"kdheepak/tabline.nvim",
|
||||||
|
config = function()
|
||||||
|
require 'tabline'.setup {
|
||||||
|
enable = true,
|
||||||
|
options = {
|
||||||
|
section_separators = { '', '' },
|
||||||
|
component_separators = { '', '' },
|
||||||
|
max_bufferline_percent = 66, -- set to nil by default, and it uses vim.o.columns * 2/3
|
||||||
|
show_tabs_always = false, -- this shows tabs only when there are more than one tab or if the first tab is named
|
||||||
|
show_devicons = true, -- this shows devicons in buffer section
|
||||||
|
show_bufnr = false, -- this appends [bufnr] to buffer section,
|
||||||
|
show_filename_only = false, -- shows base filename only instead of relative path in filename
|
||||||
|
modified_icon = "+ ", -- change the default modified icon
|
||||||
|
modified_italic = false, -- set to true by default; this determines whether the filename turns italic if modified
|
||||||
|
show_tabs_only = false, -- this shows only tabs instead of tabs + buffers
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<Tab>', '<Cmd>TablineBufferNext<CR>', {})
|
||||||
|
vim.keymap.set('n', '<S-Tab>', '<Cmd>TablineBufferPrev<CR>', {})
|
||||||
|
vim.keymap.set('n', ';x', ':bp<bar>sp<bar>bn<bar>bd<CR><CR>', { noremap = true, silent = true })
|
||||||
|
end,
|
||||||
|
}
|
Loading…
Reference in New Issue