mirror of
https://github.com/Tilo-K/neovim-config.git
synced 2026-07-03 13:43:02 +00:00
Stuff
This commit is contained in:
52
init.lua
52
init.lua
@@ -1,41 +1,3 @@
|
||||
--[[
|
||||
|
||||
=====================================================================
|
||||
==================== READ THIS BEFORE CONTINUING ====================
|
||||
=====================================================================
|
||||
|
||||
Kickstart.nvim is *not* a distribution.
|
||||
|
||||
Kickstart.nvim is a template for your own configuration.
|
||||
The goal is that you can read every line of code, top-to-bottom, and understand
|
||||
what your configuration is doing.
|
||||
|
||||
Once you've done that, you should start exploring, configuring and tinkering to
|
||||
explore Neovim!
|
||||
|
||||
If you don't know anything about Lua, I recommend taking some time to read through
|
||||
a guide. One possible example:
|
||||
- https://learnxinyminutes.com/docs/lua/
|
||||
|
||||
And then you can explore or search through `:help lua-guide`
|
||||
|
||||
|
||||
Kickstart Guide:
|
||||
|
||||
I have left several `:help X` comments throughout the init.lua
|
||||
You should run that command and read that help section for more information.
|
||||
|
||||
In addition, I have some `NOTE:` items throughout the file.
|
||||
These are for you, the reader to help understand what is happening. Feel free to delete
|
||||
them once you know what you're doing, but they should serve as a guide for when you
|
||||
are first encountering a few different constructs in your nvim config.
|
||||
|
||||
I hope you enjoy your Neovim journey,
|
||||
- TJ
|
||||
|
||||
P.S. You can delete this when you're done too. It's your config now :)
|
||||
--]]
|
||||
|
||||
-- Set <space> as the leader key
|
||||
-- See `:help mapleader`
|
||||
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
|
||||
@@ -501,3 +463,17 @@ vim.api.nvim_set_keymap('n', '<C-j>', ':wincmd j<CR>', {silent = true})
|
||||
vim.api.nvim_set_keymap('n', '<C-h>', ':wincmd h<CR>', {silent = true})
|
||||
vim.api.nvim_set_keymap('n', '<C-l>', ':wincmd l<CR>', {silent = true})
|
||||
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<leader>sn', '<cmd>lua require("impulse").menu_search()<cr>', {noremap = true})
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<Leader>gd', '<cmd>lua vim.lsp.buf.definition()<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Apply the keymap to all buffers
|
||||
vim.cmd([[
|
||||
augroup lsp_keymaps
|
||||
autocmd!
|
||||
autocmd BufEnter * lua vim.api.nvim_buf_set_keymap(0, 'n', '<Leader>gd', '<cmd>lua vim.lsp.buf.definition()<CR>', { noremap = true, silent = true })
|
||||
augroup END
|
||||
]])
|
||||
|
||||
vim.api.nvim_buf_set_keymap(vim.fn.bufnr(), 'n', '<Leader>rs', '<cmd>lua vim.lsp.buf.rename()<CR>', { noremap = true, silent = true })
|
||||
|
||||
Reference in New Issue
Block a user