Adding my configuration
This commit is contained in:
parent
e6710a461a
commit
31b43f802a
73
init.lua
73
init.lua
|
@ -148,6 +148,66 @@ vim.opt.cursorline = true
|
||||||
-- Minimal number of screen lines to keep above and below the cursor.
|
-- Minimal number of screen lines to keep above and below the cursor.
|
||||||
vim.opt.scrolloff = 10
|
vim.opt.scrolloff = 10
|
||||||
|
|
||||||
|
-- Custom Options
|
||||||
|
local opt = vim.opt
|
||||||
|
|
||||||
|
-- Set highlight on search
|
||||||
|
opt.hlsearch = false
|
||||||
|
|
||||||
|
-- Make line numbers default
|
||||||
|
opt.number = true
|
||||||
|
opt.relativenumber = true
|
||||||
|
|
||||||
|
-- Enable mouse mode
|
||||||
|
opt.mouse = 'a'
|
||||||
|
|
||||||
|
-- Sync clipboard between OS and Neovim.
|
||||||
|
-- Remove this option if you want your OS clipboard to remain independent.
|
||||||
|
-- See `:help 'clipboard'`
|
||||||
|
opt.clipboard = 'unnamedplus'
|
||||||
|
|
||||||
|
-- Enable break indent
|
||||||
|
opt.breakindent = true
|
||||||
|
|
||||||
|
-- Save undo history
|
||||||
|
opt.undofile = true
|
||||||
|
|
||||||
|
-- Case insensitive searching UNLESS /C or capital in search
|
||||||
|
opt.ignorecase = true
|
||||||
|
opt.smartcase = true
|
||||||
|
|
||||||
|
-- Keep signcolumn on by default
|
||||||
|
opt.signcolumn = 'yes'
|
||||||
|
|
||||||
|
-- Decrease update time
|
||||||
|
opt.updatetime = 250
|
||||||
|
opt.timeout = true
|
||||||
|
opt.timeoutlen = 300
|
||||||
|
|
||||||
|
-- Set completeopt to have a better completion experience
|
||||||
|
opt.completeopt = 'menuone,noselect'
|
||||||
|
|
||||||
|
-- NOTE: You should make sure your terminal supports this
|
||||||
|
opt.termguicolors = true
|
||||||
|
|
||||||
|
opt.wildmenu = true
|
||||||
|
opt.wildmode = 'longest,list,full'
|
||||||
|
opt.showmatch = true
|
||||||
|
opt.hlsearch = true
|
||||||
|
|
||||||
|
opt.splitbelow = true
|
||||||
|
opt.splitright = true
|
||||||
|
|
||||||
|
-- not neeeded with sleuth ?
|
||||||
|
vim.o.tabstop = 2
|
||||||
|
vim.o.expandtab = false
|
||||||
|
opt.backspace = 'indent,eol,start'
|
||||||
|
|
||||||
|
--opt.tabstop = 2
|
||||||
|
vim.o.shiftwidth = 2
|
||||||
|
|
||||||
|
--- END custom options
|
||||||
|
|
||||||
-- [[ Basic Keymaps ]]
|
-- [[ Basic Keymaps ]]
|
||||||
-- See `:help vim.keymap.set()`
|
-- See `:help vim.keymap.set()`
|
||||||
|
|
||||||
|
@ -184,6 +244,13 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
|
||||||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||||
|
|
||||||
|
--- CUSTOM KEYMAPS
|
||||||
|
|
||||||
|
-- nvim tree
|
||||||
|
vim.keymap.set('n', '<leader>e', vim.cmd.NvimTreeToggle, { desc = 'Toggle [E]xplorer' })
|
||||||
|
|
||||||
|
-- END CUSTOM KEYMAPS
|
||||||
|
|
||||||
-- [[ Basic Autocommands ]]
|
-- [[ Basic Autocommands ]]
|
||||||
-- See `:help lua-guide-autocommands`
|
-- See `:help lua-guide-autocommands`
|
||||||
|
|
||||||
|
@ -532,7 +599,7 @@ require('lazy').setup {
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
gopls = {},
|
||||||
-- pyright = {},
|
-- pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
|
@ -806,7 +873,7 @@ require('lazy').setup {
|
||||||
-- Here are some example plugins that I've included in the kickstart repository.
|
-- Here are some example plugins that I've included in the kickstart repository.
|
||||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||||
--
|
--
|
||||||
-- require 'kickstart.plugins.debug',
|
require 'kickstart.plugins.debug',
|
||||||
-- require 'kickstart.plugins.indent_line',
|
-- require 'kickstart.plugins.indent_line',
|
||||||
|
|
||||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
|
@ -814,7 +881,7 @@ require('lazy').setup {
|
||||||
--
|
--
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
-- 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`
|
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
||||||
-- { import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
}
|
}
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"extras": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"news": {
|
||||||
|
"NEWS.md": "2123"
|
||||||
|
},
|
||||||
|
"version": 2
|
||||||
|
}
|
|
@ -2,4 +2,57 @@
|
||||||
-- I promise not to create any merge conflicts in this directory :)
|
-- I promise not to create any merge conflicts in this directory :)
|
||||||
--
|
--
|
||||||
-- See the kickstart.nvim README for more information
|
-- See the kickstart.nvim README for more information
|
||||||
return {}
|
return {
|
||||||
|
{
|
||||||
|
'alexghergh/nvim-tmux-navigation',
|
||||||
|
config = function()
|
||||||
|
local nvim_tmux_nav = require 'nvim-tmux-navigation'
|
||||||
|
vim.keymap.set('n', '<C-h>', nvim_tmux_nav.NvimTmuxNavigateLeft)
|
||||||
|
vim.keymap.set('n', '<C-j>', nvim_tmux_nav.NvimTmuxNavigateDown)
|
||||||
|
vim.keymap.set('n', '<C-k>', nvim_tmux_nav.NvimTmuxNavigateUp)
|
||||||
|
vim.keymap.set('n', '<C-l>', nvim_tmux_nav.NvimTmuxNavigateRight)
|
||||||
|
vim.keymap.set('n', '<C-\\>', nvim_tmux_nav.NvimTmuxNavigateLastActive)
|
||||||
|
vim.keymap.set('n', '<C-Space>', nvim_tmux_nav.NvimTmuxNavigateNext)
|
||||||
|
|
||||||
|
nvim_tmux_nav.setup {
|
||||||
|
disable_when_zoomed = true, -- defaults to false
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{ '<C-\\>', '<cmd>TmuxNavigatePrevious<cr>', desc = 'Go to the previous pane' },
|
||||||
|
{ '<C-h>', '<cmd>TmuxNavigateLeft<cr>', desc = 'Got to the left pane' },
|
||||||
|
{ '<C-j>', '<cmd>TmuxNavigateDown<cr>', desc = 'Got to the down pane' },
|
||||||
|
{ '<C-k>', '<cmd>TmuxNavigateUp<cr>', desc = 'Got to the up pane' },
|
||||||
|
{ '<C-l>', '<cmd>TmuxNavigateRight<cr>', desc = 'Got to the right pane' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'nvim-tree/nvim-tree.lua',
|
||||||
|
'nvim-tree/nvim-web-devicons',
|
||||||
|
|
||||||
|
{
|
||||||
|
'utilyre/barbecue.nvim',
|
||||||
|
config = function()
|
||||||
|
require('barbecue').setup()
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
'SmiteshP/nvim-navic',
|
||||||
|
'nvim-tree/nvim-web-devicons', -- optional dependency
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ 'catppuccin/nvim', name = 'catppuccin' },
|
||||||
|
{
|
||||||
|
'LazyVim/LazyVim',
|
||||||
|
opts = {
|
||||||
|
colorscheme = 'catppuccin',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'folke/todo-comments.nvim',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
|
opts = {
|
||||||
|
-- your configuration comes here
|
||||||
|
-- or leave it empty to use the default settings
|
||||||
|
-- refer to the configuration section below
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue