Skip to content

Commit 464fc8a

Browse files
committed
add some custom stuff
1 parent 8d1ef97 commit 464fc8a

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

init.lua

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
9191
vim.g.maplocalleader = ' '
9292

9393
-- Set to true if you have a Nerd Font installed and selected in the terminal
94-
vim.g.have_nerd_font = false
94+
vim.g.have_nerd_font = true
9595

9696
-- [[ Setting options ]]
9797
-- See `:help vim.opt`
@@ -189,6 +189,7 @@ vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left wind
189189
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
190190
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
191191
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
192+
vim.keymap.set('n', '<C-x>', '<C-w><C-c>', { desc = 'Close current split' })
192193

193194
-- [[ Basic Autocommands ]]
194195
-- See `:help lua-guide-autocommands`
@@ -216,6 +217,9 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
216217
end ---@diagnostic disable-next-line: undefined-field
217218
vim.opt.rtp:prepend(lazypath)
218219

220+
require 'custom.keymaps'
221+
require 'custom.options'
222+
219223
-- [[ Configure and install plugins ]]
220224
--
221225
-- To check the current status of your plugins, run
@@ -617,7 +621,7 @@ require('lazy').setup({
617621
local servers = {
618622
-- clangd = {},
619623
-- gopls = {},
620-
-- pyright = {},
624+
pyright = {},
621625
-- rust_analyzer = {},
622626
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
623627
--
@@ -928,17 +932,17 @@ require('lazy').setup({
928932
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
929933
--
930934
-- require 'kickstart.plugins.debug',
931-
-- require 'kickstart.plugins.indent_line',
932-
-- require 'kickstart.plugins.lint',
933-
-- require 'kickstart.plugins.autopairs',
934-
-- require 'kickstart.plugins.neo-tree',
935-
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
935+
require 'kickstart.plugins.indent_line',
936+
require 'kickstart.plugins.lint',
937+
require 'kickstart.plugins.autopairs',
938+
require 'kickstart.plugins.neo-tree',
939+
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
936940

937941
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
938942
-- This is the easiest way to modularize your config.
939943
--
940944
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
941-
-- { import = 'custom.plugins' },
945+
{ import = 'custom.plugins' },
942946
--
943947
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
944948
-- Or use telescope!

lua/custom/keymaps.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vim.keymap.set('n', '<leader>sv', '<C-w>v', { desc = 'Open verticle split' })
2+
vim.keymap.set('n', '<leader>sh', '<C-w>h', { desc = 'Open horizontal split' })

lua/custom/options.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
local opt = vim.opt
2+
3+
opt.tabstop = 2
4+
opt.shiftwidth = 2
5+
opt.expandtab = true
6+
opt.autoindent = true

0 commit comments

Comments
 (0)