From 464fc8ac81d4b2b59943f2cf866d7ed29ec86f35 Mon Sep 17 00:00:00 2001 From: Zach Drone Date: Sat, 30 Nov 2024 19:35:03 -0500 Subject: [PATCH] add some custom stuff --- init.lua | 20 ++++++++++++-------- lua/custom/keymaps.lua | 2 ++ lua/custom/options.lua | 6 ++++++ 3 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 lua/custom/keymaps.lua create mode 100644 lua/custom/options.lua diff --git a/init.lua b/init.lua index 08717d53..0128fb7c 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,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` @@ -189,6 +189,7 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the left wind vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +vim.keymap.set('n', '', '', { desc = 'Close current split' }) -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -216,6 +217,9 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then end ---@diagnostic disable-next-line: undefined-field vim.opt.rtp:prepend(lazypath) +require 'custom.keymaps' +require 'custom.options' + -- [[ Configure and install plugins ]] -- -- To check the current status of your plugins, run @@ -617,7 +621,7 @@ require('lazy').setup({ local servers = { -- clangd = {}, -- gopls = {}, - -- pyright = {}, + pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -928,17 +932,17 @@ require('lazy').setup({ -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- -- require 'kickstart.plugins.debug', - -- 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.indent_line', + require 'kickstart.plugins.lint', + require 'kickstart.plugins.autopairs', + 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/custom/keymaps.lua b/lua/custom/keymaps.lua new file mode 100644 index 00000000..79141339 --- /dev/null +++ b/lua/custom/keymaps.lua @@ -0,0 +1,2 @@ +vim.keymap.set('n', 'sv', 'v', { desc = 'Open verticle split' }) +vim.keymap.set('n', 'sh', 'h', { desc = 'Open horizontal split' }) diff --git a/lua/custom/options.lua b/lua/custom/options.lua new file mode 100644 index 00000000..575305ff --- /dev/null +++ b/lua/custom/options.lua @@ -0,0 +1,6 @@ +local opt = vim.opt + +opt.tabstop = 2 +opt.shiftwidth = 2 +opt.expandtab = true +opt.autoindent = true