Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -189,6 +189,7 @@ vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left wind
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right 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-x>', '<C-w><C-c>', { desc = 'Close current split' })

-- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands`
Expand Down Expand Up @@ -617,7 +618,7 @@ require('lazy').setup({
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
pylsp = {},
-- rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
Expand Down Expand Up @@ -657,6 +658,8 @@ require('lazy').setup({
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'stylua', -- Used to format Lua code
'pylsp',
'black',
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }

Expand Down Expand Up @@ -710,7 +713,7 @@ require('lazy').setup({
formatters_by_ft = {
lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
python = { 'isort', 'black' },
--
-- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true },
Expand Down Expand Up @@ -928,17 +931,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!
Expand Down Expand Up @@ -966,5 +969,8 @@ require('lazy').setup({
},
})

require 'custom.keymaps'
require 'custom.options'

-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et
5 changes: 5 additions & 0 deletions lua/custom/keymaps.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
local builtin = require 'telescope.builtin'
vim.keymap.set('n', '<leader>sv', '<C-w>v', { desc = 'Open verticle split' })
vim.keymap.set('n', '<leader>sh', '<C-w>h', { desc = 'Open horizontal split' })
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
vim.keymap.set('i', 'jk', '<ESC>')
10 changes: 10 additions & 0 deletions lua/custom/options.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
local opt = vim.opt

opt.tabstop = 2
opt.shiftwidth = 2
opt.expandtab = true
opt.autoindent = true
opt.relativenumber = true
opt.number = true

opt.wrap = false
2 changes: 1 addition & 1 deletion lua/custom/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}
return { 'tpope/vim-fugitive' }
19 changes: 19 additions & 0 deletions lua/custom/plugins/lazygit.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
return {
'kdheepak/lazygit.nvim',
cmd = {
'LazyGit',
'LazyGitConfig',
'LazyGitCurrentFile',
'LazyGitFilter',
'LazyGitFilterCurrentFile',
},
-- optional for floating window border decoration
dependencies = {
'nvim-lua/plenary.nvim',
},
-- setting the keybinding for LazyGit with 'keys' is recommended in
-- order to load the plugin when the command is run for the first time
keys = {
{ '<leader>lg', '<cmd>LazyGit<cr>', desc = 'Open lazy git' },
},
}
17 changes: 17 additions & 0 deletions lua/custom/plugins/vim-tmux-navigator.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
return {
'christoomey/vim-tmux-navigator',
cmd = {
'TmuxNavigateLeft',
'TmuxNavigateDown',
'TmuxNavigateUp',
'TmuxNavigateRight',
'TmuxNavigatePrevious',
},
keys = {
{ '<c-h>', '<cmd><C-U>TmuxNavigateLeft<cr>' },
{ '<c-j>', '<cmd><C-U>TmuxNavigateDown<cr>' },
{ '<c-k>', '<cmd><C-U>TmuxNavigateUp<cr>' },
{ '<c-l>', '<cmd><C-U>TmuxNavigateRight<cr>' },
{ '<c-\\>', '<cmd><C-U>TmuxNavigatePrevious<cr>' },
},
}
Loading