Skip to content

Commit b421d0c

Browse files
committed
donny-top commits
1 parent 94f551b commit b421d0c

2 files changed

Lines changed: 43 additions & 36 deletions

File tree

init.lua

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
--[[
22
3+
34
=====================================================================
45
==================== READ THIS BEFORE CONTINUING ====================
56
=====================================================================
@@ -102,7 +103,7 @@ vim.g.have_nerd_font = false
102103
vim.opt.number = true
103104
-- You can also add relative line numbers, to help with jumping.
104105
-- Experiment for yourself to see if you like it!
105-
-- vim.opt.relativenumber = true
106+
vim.opt.relativenumber = true
106107

107108
-- Enable mouse mode, can be useful for resizing splits for example!
108109
vim.opt.mouse = 'a'
@@ -156,38 +157,8 @@ vim.opt.cursorline = true
156157
-- Minimal number of screen lines to keep above and below the cursor.
157158
vim.opt.scrolloff = 10
158159

159-
-- [[ Basic Keymaps ]]
160-
-- See `:help vim.keymap.set()`
161-
162-
-- Clear highlights on search when pressing <Esc> in normal mode
163-
-- See `:help hlsearch`
164-
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
165-
166-
-- Diagnostic keymaps
167-
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
168-
169-
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
170-
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
171-
-- is not what someone will guess without a bit more experience.
172-
--
173-
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
174-
-- or just use <C-\><C-n> to exit terminal mode
175-
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
176-
177-
-- TIP: Disable arrow keys in normal mode
178-
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
179-
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
180-
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
181-
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
182-
183-
-- Keybinds to make split navigation easier.
184-
-- Use CTRL+<hjkl> to switch between windows
185-
--
186-
-- See `:help wincmd` for a list of all window commands
187-
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
188-
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
189-
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
190-
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
160+
--pull in remaps
161+
require 'remap'
191162

192163
-- [[ Basic Autocommands ]]
193164
-- See `:help lua-guide-autocommands`
@@ -328,7 +299,7 @@ require('lazy').setup({
328299
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
329300
{ '<leader>d', group = '[D]ocument' },
330301
{ '<leader>r', group = '[R]ename' },
331-
{ '<leader>s', group = '[S]earch' },
302+
{ '<leader>S', group = '[S]earch' },
332303
{ '<leader>w', group = '[W]orkspace' },
333304
{ '<leader>t', group = '[T]oggle' },
334305
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
@@ -628,6 +599,7 @@ require('lazy').setup({
628599
local servers = {
629600
-- clangd = {},
630601
-- gopls = {},
602+
pylsp = {},
631603
-- pyright = {},
632604
-- rust_analyzer = {},
633605
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
@@ -859,8 +831,7 @@ require('lazy').setup({
859831
-- Load the colorscheme here.
860832
-- Like many other themes, this one has different styles, and you could load
861833
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
862-
vim.cmd.colorscheme 'tokyonight-night'
863-
834+
vim.cmd.colorscheme 'tokyonight-storm'
864835
-- You can configure highlights by doing something like:
865836
vim.cmd.hi 'Comment gui=none'
866837
end,

remap.lua

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
-- [[ Basic Keymaps ]]
2+
-- See `:help vim.keymap.set()`
3+
4+
-- Clear highlights on search when pressing <Esc> in normal mode
5+
-- See `:help hlsearch`
6+
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
7+
8+
-- Diagnostic keymaps
9+
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
10+
--navigation keymaps
11+
vim.keymap.set('n', '<leader>pv', vim.cmd.Ex, { desc = 'Exit file and return to navigation' })
12+
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
13+
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
14+
-- is not what someone will guess without a bit more experience.
15+
--
16+
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
17+
-- or just use <C-\><C-n> to exit terminal mode
18+
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
19+
20+
-- TIP: Disable arrow keys in normal mode
21+
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
22+
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
23+
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
24+
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
25+
26+
-- Keybinds to make split navigation easier.
27+
-- Use CTRL+<hjkl> to switch between windows
28+
--
29+
-- See `:help wincmd` for a list of all window commands
30+
vim.keymap.set('n', '<leader>u', '<C-w><C-h>', { desc = 'Move focus to the left window' })
31+
vim.keymap.set('n', '<leader>i', '<C-w><C-l>', { desc = 'Move focus to the right window' })
32+
vim.keymap.set('n', '<leader>l', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
33+
vim.keymap.set('n', '<leader>o', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
34+
--split window maps
35+
vim.keymap.set('n', '<leader>xs', ':close', { desc = 'Close current window' })
36+
vim.keymap.set('n', '<leader>s', ':vsplit', { desc = 'Split window vertically' })

0 commit comments

Comments
 (0)