diff --git a/init.lua b/init.lua index 1e854c8..674f994 100644 --- a/init.lua +++ b/init.lua @@ -1,8 +1,8 @@ -require('plugins') -require('post_plugins') require('platform') require('custom') require('settings') +require('plugins') +require('post_plugins') require('plugin_options') require('utilities') require('keymaps') diff --git a/lua/plugins.lua b/lua/plugins.lua index c982c3a..dfd0e89 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,13 +1,18 @@ -vim.cmd([[ - augroup packer_user_config - autocmd! - autocmd BufWritePost plugins.lua source | PackerCompile - augroup end -]]) +-- vim.cmd([[ +-- augroup packer_user_config +-- autocmd! +-- autocmd BufWritePost plugins.lua source | PackerCompile +-- augroup end +-- ]]) return require('packer').startup(function(use) -- Packer can manage itself - use 'wbthomason/packer.nvim' + use { + 'wbthomason/packer.nvim', + config = function() + vim.keymap.set('n', 'ps', ':PackerSync', { noremap = true }) + end + } -- === -- Core @@ -38,13 +43,49 @@ return require('packer').startup(function(use) config = function() require('lualine').setup { options = { - theme = 'dracula' + theme = 'dracula', + component_separators = { left = '', right = '' }, + section_separators = { left = '', right = '' }, + icons_enabled = true, + globalstatus = true } } end } end + if vim.g.use_tabline == true then + use { + 'kdheepak/tabline.nvim', + config = function() + require('tabline').setup { + -- Defaults configuration options + enable = true, + options = { + -- If lualine is installed tabline will use separators configured in lualine by default. + -- These options can be used to override those settings. + --section_separators = {'', ''}, + --component_separators = {'', ''}, + --max_bufferline_percent = 66, -- set to nil by default, and it uses vim.o.columns * 2/3 + show_tabs_always = true, -- this shows tabs only when there are more than one tab or if the first tab is named + show_devicons = false, -- 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.cmd([[ + set guioptions-=e " Use showtabline in gui vim + set sessionoptions+=tabpages,globals " store tabpages and globals in session + ]]) + end + -- requires = { { 'nvim-lualine/lualine.nvim', opt=true }, {'kyazdani42/nvim-web-devicons', opt = true} } + } + end + if vim.g.use_comfortable_motion == true then use 'yuttie/comfortable-motion.vim' end @@ -169,6 +210,11 @@ return require('packer').startup(function(use) requires = { {'nvim-lua/plenary.nvim'} }, config = function() require('telescope').setup() + + vim.keymap.set('n', 'ff', 'Telescope find_files theme=dropdown', { noremap = true }) + vim.keymap.set('n', 'fg', 'Telescope live_grep theme=dropdown', { noremap = true }) + vim.keymap.set('n', 'fb', 'Telescope buffers theme=dropdown', { noremap = true }) + vim.keymap.set('n', 'fd', 'Telescope builtin theme=dropdown', { noremap = true }) end } -- === diff --git a/lua/post_plugins.lua b/lua/post_plugins.lua index d7a3615..51dd39b 100644 --- a/lua/post_plugins.lua +++ b/lua/post_plugins.lua @@ -1,3 +1,6 @@ +-- === +-- Configure the on_attach function that defines keymaps +-- === local lspconfig = require('lspconfig') local opts = { noremap = true, silent = true } @@ -37,3 +40,10 @@ for _, lsp in pairs(servers) do on_attach = on_attach } end +-- === + +-- === +-- Colorscheme +-- === +vim.cmd('colorscheme dracula') +-- === diff --git a/lua/settings.lua b/lua/settings.lua index a76e4fd..b2f010d 100644 --- a/lua/settings.lua +++ b/lua/settings.lua @@ -108,7 +108,7 @@ local config = { use_async = true, use_autocomplete = 0, use_bufkill = true, - use_buftabline = true, + use_buftabline = false, use_clang_format = false, use_coc = false, use_comfortable_motion = false, @@ -130,6 +130,7 @@ local config = { use_rust = true, use_sound = false, use_sxhkd = true, + use_tabline = true, use_templator = false, use_utf8 = true, use_vimtex = true, @@ -193,11 +194,5 @@ vim.cmd([[ ]]) -- === --- === --- Colorscheme --- === -vim.cmd('colorscheme dracula') --- === - --vim.cmd("hi LineNr guifg=#B0BEC5") --vim.cmd("hi CursorLineNr guifg=#64FFDA")