From 9ed4696ad100b6cb8fae8ad186dc5ceb3ec327e0 Mon Sep 17 00:00:00 2001 From: Hendra Date: Sat, 9 Mar 2024 21:42:52 +0700 Subject: [PATCH] Tweaks --- init.lua | 46 +++++++++------------------------ lua/custom/plugins/filetree.lua | 14 ++++++++++ 2 files changed, 26 insertions(+), 34 deletions(-) create mode 100644 lua/custom/plugins/filetree.lua diff --git a/init.lua b/init.lua index 3bdb5e36..660b34fd 100644 --- a/init.lua +++ b/init.lua @@ -1,36 +1,5 @@ --[[ -===================================================================== -==================== READ THIS BEFORE CONTINUING ==================== -===================================================================== -======== .-----. ======== -======== .----------------------. | === | ======== -======== |.-""""""""""""""""""-.| |-----| ======== -======== || || | === | ======== -======== || KICKSTART.NVIM || |-----| ======== -======== || || | === | ======== -======== || || |-----| ======== -======== ||:Tutor || |:::::| ======== -======== |'-..................-'| |____o| ======== -======== `"")----------------(""` ___________ ======== -======== /::::::::::| |::::::::::\ \ no mouse \ ======== -======== /:::========| |==hjkl==:::\ \ required \ ======== -======== '""""""""""""' '""""""""""""' '""""""""""' ======== -======== ======== -===================================================================== -===================================================================== - -What is Kickstart? - - Kickstart.nvim is *not* a distribution. - - Kickstart.nvim is a starting point for your own configuration. - The goal is that you can read every line of code, top-to-bottom, understand - what your configuration is doing, and modify it to suit your needs. - - Once you've done that, you can start exploring, configuring and tinkering to - make Neovim your own! That might mean leaving kickstart just the way it is for a while - or immediately breaking it into modular pieces. It's up to you! If you don't know anything about Lua, I recommend taking some time to read through a guide. One possible example which will only take 10-15 minutes: @@ -91,7 +60,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -100,6 +69,7 @@ vim.g.have_nerd_font = false -- Make line numbers default vim.opt.number = true + -- You can also add relative line numbers, for help with jumping. -- Experiment for yourself to see if you like it! -- vim.opt.relativenumber = true @@ -158,6 +128,12 @@ vim.opt.scrolloff = 10 vim.opt.hlsearch = true vim.keymap.set('n', '', 'nohlsearch') +vim.keymap.set('i', 'jj', '') +vim.keymap.set('n', 'n', 'Neotree toggle') +vim.keymap.set('n', 'c', 'bd') +vim.keymap.set('n', 'h', 'bprev') +vim.keymap.set('n', 'l', 'bnext') + -- Diagnostic keymaps vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' }) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' }) @@ -533,7 +509,7 @@ require('lazy').setup({ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { -- clangd = {}, - -- gopls = {}, + gopls = {}, -- pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs @@ -772,6 +748,8 @@ require('lazy').setup({ return '%2l:%-2v' end + require('mini.tabline').setup() + -- ... and there is more! -- Check out: https://github.com/echasnovski/mini.nvim end, @@ -818,7 +796,7 @@ require('lazy').setup({ -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, { ui = { -- If you have a Nerd Font, set icons to an empty table which will use the diff --git a/lua/custom/plugins/filetree.lua b/lua/custom/plugins/filetree.lua new file mode 100644 index 00000000..7885bd01 --- /dev/null +++ b/lua/custom/plugins/filetree.lua @@ -0,0 +1,14 @@ +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 {} + end, +}