diff --git a/init.lua b/init.lua index ee8fbc992e1..21fa0b58aca 100644 --- a/init.lua +++ b/init.lua @@ -83,7 +83,8 @@ I hope you enjoy your Neovim journey, P.S. You can delete this when you're done too. It's your config now! :) --]] - +require 'core.options' +require 'core.keymaps' -- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) @@ -91,7 +92,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -134,7 +135,7 @@ vim.opt.signcolumn = 'yes' -- Decrease update time vim.opt.updatetime = 250 --- Decrease mapped sequence wait time +-- Decrease mapped sequence wait tim -- Displays which-key popup sooner vim.opt.timeoutlen = 300 @@ -157,6 +158,9 @@ vim.opt.cursorline = true -- Minimal number of screen lines to keep above and below the cursor. vim.opt.scrolloff = 10 +-- Tab length +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` @@ -176,10 +180,10 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) -- TIP: Disable arrow keys in normal mode --- vim.keymap.set('n', '', 'echo "Use h to move!!"') --- vim.keymap.set('n', '', 'echo "Use l to move!!"') --- vim.keymap.set('n', '', 'echo "Use k to move!!"') --- vim.keymap.set('n', '', 'echo "Use j to move!!"') +vim.keymap.set('n', '', 'echo "Use h to move!!"') +vim.keymap.set('n', '', 'echo "Use l to move!!"') +vim.keymap.set('n', '', 'echo "Use k to move!!"') +vim.keymap.set('n', '', 'echo "Use j to move!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows @@ -614,9 +618,9 @@ require('lazy').setup({ -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, + clangd = {}, + gopls = {}, + pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -844,7 +848,7 @@ require('lazy').setup({ -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'tokyonight-storm' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' @@ -930,14 +934,14 @@ require('lazy').setup({ -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! diff --git a/lua/core/keymaps.lua b/lua/core/keymaps.lua new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lua/core/options.lua b/lua/core/options.lua new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lua/custom/plugins/bufferline.lua b/lua/custom/plugins/bufferline.lua new file mode 100644 index 00000000000..302caa6e22a --- /dev/null +++ b/lua/custom/plugins/bufferline.lua @@ -0,0 +1,61 @@ +return { + 'akinsho/bufferline.nvim', + dependencies = { + 'moll/vim-bbye', + 'nvim-tree/nvim-web-devicons', + }, + config = function() + require('bufferline').setup { + options = { + mode = 'buffers', -- set to "tabs" to only show tabpages instead + themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default + numbers = 'none', -- | "ordinal" | "buffer_id" | "both" | function({ ordinal, id, lower, raise }): string, + close_command = 'Bdelete! %d', -- can be a string | function, see "Mouse actions" + buffer_close_icon = '✗', + close_icon = '✗', + path_components = 1, -- Show only the file name without the directory + modified_icon = '●', + left_trunc_marker = '', + right_trunc_marker = '', + max_name_length = 30, + max_prefix_length = 30, -- prefix used when a buffer is de-duplicated + tab_size = 21, + diagnostics = false, + diagnostics_update_in_insert = false, + color_icons = true, + show_buffer_icons = true, + show_buffer_close_icons = true, + show_close_icon = true, + persist_buffer_sort = true, -- whether or not custom sorted buffers should persist + separator_style = { '│', '│' }, -- | "thick" | "thin" | { 'any', 'any' }, + enforce_regular_tabs = true, + always_show_bufferline = true, + show_tab_indicators = false, + indicator = { + -- icon = '▎', -- this should be omitted if indicator style is not 'icon' + style = 'none', -- Options: 'icon', 'underline', 'none' + }, + icon_pinned = '󰐃', + minimum_padding = 1, + maximum_padding = 5, + maximum_length = 15, + sort_by = 'insert_at_end', + }, + highlights = { + separator = { + fg = '#434C5E', + }, + buffer_selected = { + bold = true, + italic = false, + }, + -- separator_selected = {}, + -- tab_selected = {}, + -- background = {}, + -- indicator_selected = {}, + -- fill = {}, + }, + } + end, +} + diff --git a/lua/custom/plugins/indent-blankline.lua b/lua/custom/plugins/indent-blankline.lua new file mode 100644 index 00000000000..ead13145c0d --- /dev/null +++ b/lua/custom/plugins/indent-blankline.lua @@ -0,0 +1,25 @@ +return { + 'lukas-reineke/indent-blankline.nvim', + main = 'ibl', + opts = { + indent = { + char = '▏', + }, + scope = { + show_start = false, + show_end = false, + show_exact_scope = false, + }, + exclude = { + filetypes = { + 'help', + 'startify', + 'dashboard', + 'packer', + 'neogitstatus', + 'NvimTree', + 'Trouble', + }, + }, + }, +} \ No newline at end of file