Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color #39

Closed
wants to merge 14 commits into from
2 changes: 2 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ 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.opt.conceallevel = 2


-- [[ Setting options ]]
require 'options'
Expand Down
1 change: 1 addition & 0 deletions lua/custom/plugins/catppuccin.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
return { 'catppuccin/nvim', name = 'catppuccin', priority = 1000 }
60 changes: 60 additions & 0 deletions lua/custom/plugins/harpoon.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
-- harpoon2
return {
'ThePrimeagen/harpoon',
branch = 'harpoon2',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local harpoon = require 'harpoon'

harpoon:setup()

-- basic telescope configuration
local conf = require('telescope.config').values
local function toggle_telescope(harpoon_files)
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end

require('telescope.pickers')
.new({}, {
prompt_title = 'Harpoon',
finder = require('telescope.finders').new_table {
results = file_paths,
},
previewer = conf.file_previewer {},
sorter = conf.generic_sorter {},
})
:find()
end

vim.keymap.set('n', '<leader>hl', function()
toggle_telescope(harpoon:list())
end, { desc = 'Open harpoon window' })

vim.keymap.set('n', '<leader>ha', function()
harpoon:list():add()
end, { desc = 'Harpoon current file' })

vim.keymap.set('n', '<C-h>', function()
harpoon:list():select(1)
end)
vim.keymap.set('n', '<C-t>', function()
harpoon:list():select(2)
end)
vim.keymap.set('n', '<C-n>', function()
harpoon:list():select(3)
end)
vim.keymap.set('n', '<C-s>', function()
harpoon:list():select(4)
end)

-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set('n', '<leader>hp', function()
harpoon:list():prev()
end)
vim.keymap.set('n', '<leader>hn', function()
harpoon:list():next()
end)
end,
}
32 changes: 32 additions & 0 deletions lua/custom/plugins/lualine.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
return {
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require('lualine').setup {
options = {
icons_enabled = true,
component_separators = '|',
section_separators = '',
},
sections = {
lualine_x = {
{
require('noice').api.statusline.mode.get,
cond = require('noice').api.statusline.mode.has,
color = { fg = '#ff9e64' },
},
{
require('noice').api.status.command.get,
cond = require('noice').api.status.command.has,
color = { fg = '#ff9e64' },
},
},
lualine_a = {
{
'buffers',
},
},
},
}
end,
}
9 changes: 9 additions & 0 deletions lua/custom/plugins/mini.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return {
{
'echasnovski/mini.nvim',
config = function()
require('mini.ai').setup()
require('mini.surround').setup()
end,
},
}
28 changes: 28 additions & 0 deletions lua/custom/plugins/noice.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
return {
'folke/noice.nvim',
config = function()
require('noice').setup {
-- add any options here
routes = {
{
filter = {
event = 'msg_show',
any = {
{ find = '%d+L, %d+B' },
{ find = '; after #%d+' },
{ find = '; before #%d+' },
{ find = '%d fewer lines' },
{ find = '%d more lines' },
},
},
opts = { skip = true },
},
},
}
end,
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
'MunifTanjim/nui.nvim',
'rcarriga/nvim-notify',
},
}
49 changes: 49 additions & 0 deletions lua/custom/plugins/obsidian.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
return {
'epwalsh/obsidian.nvim',
version = '*', -- recommended, use latest release instead of latest commit
lazy = true,
ft = 'markdown',
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
-- event = {
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
-- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md"
-- "BufReadPre path/to/my-vault/**.md",
-- "BufNewFile path/to/my-vault/**.md",
-- },
dependencies = {
-- Required.
'nvim-lua/plenary.nvim',

-- see below for full list of optional dependencies 👇
},
opts = {
workspaces = {
{
name = 'notes2024',
path = '~/Dropbox/notes/Personal2024/',
},
},

daily_notes = {
-- Optional, if you keep daily notes in a separate directory.
folder = 'Daily',
-- Optional, if you want to change the date format for the ID of daily notes.
date_format = '%Y-%m-%d',
-- Optional, if you want to change the date format of the default alias of daily notes.
alias_format = '%B %-d, %Y',
-- Optional, default tags to add to each new daily note created.
default_tags = { 'daily-notes' },
-- Optional, if you want to automatically insert a template from your template directory like 'daily.md'
template = 'template-daily-notes',
},

templates = {
folder = 'Templates',
date_format = '%Y-%m-%d',
time_format = '%H:%M',
-- A map for custom variables, the key should be the variable and the value a function
substitutions = {},
},
-- see below for full list of options 👇
},
}
24 changes: 24 additions & 0 deletions lua/custom/plugins/oil.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
return {
{
'stevearc/oil.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require('oil').setup {
columns = { 'icon' },
keymaps = {
['<C-h>'] = false,
['<M-h>'] = 'actions.select_split',
},
view_options = {
show_hidden = true,
},
}

-- Open parent directory in current window
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' })

-- Open parent directory in floating window
vim.keymap.set('n', '<space>-', require('oil').toggle_float)
end,
},
}
22 changes: 22 additions & 0 deletions lua/custom/plugins/trouble.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
return {
{
'folke/trouble.nvim',
config = function()
require('trouble').setup {
-- icons = false,
}

vim.keymap.set('n', '<leader>tt', function()
require('trouble').toggle()
end)

vim.keymap.set('n', '[t', function()
require('trouble').next { skip_groups = true, jump = true }
end)

vim.keymap.set('n', ']t', function()
require('trouble').previous { skip_groups = true, jump = true }
end)
end,
},
}
17 changes: 17 additions & 0 deletions lua/custom/plugins/venv-selecto.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
return {
'linux-cultist/venv-selector.nvim',
dependencies = {
'neovim/nvim-lspconfig',
'mfussenegger/nvim-dap',
'mfussenegger/nvim-dap-python', --optional
{ 'nvim-telescope/telescope.nvim', branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim' } },
},
lazy = false,
branch = 'regexp', -- This is the regexp branch, use this for the new version
config = function()
require('venv-selector').setup()
end,
keys = {
{ ',v', '<cmd>VenvSelect<cr>' },
},
}
9 changes: 9 additions & 0 deletions lua/custom/plugins/vim-be-good.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return {
'theprimeagen/vim-be-good',

dependencies = {
'nvim-lua/plenary.nvim',
},

config = function() end,
}
19 changes: 13 additions & 6 deletions lua/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,30 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })

-- TIP: Disable arrow keys in normal mode
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')

-- Keybinds to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows
--
-- See `:help wincmd` for a list of all window commands
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
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-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', '<leader>f', vim.lsp.buf.format)

vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")

-- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands`

vim.keymap.set('n', '<leader>f', vim.lsp.buf.format)

-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
-- See `:help vim.highlight.on_yank()`
Expand Down
46 changes: 22 additions & 24 deletions lua/kickstart/plugins/cmp.lua
Original file line number Diff line number Diff line change
@@ -1,52 +1,47 @@
return {
{ -- Autocompletion
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
lazy = false,
priority = 100,
-- event = 'InsertEnter',
dependencies = {
-- Snippet Engine & its associated nvim-cmp source
{
'L3MON4D3/LuaSnip',
build = (function()
-- Build Step is needed for regex support in snippets.
-- This step is not supported in many windows environments.
-- Remove the below condition to re-enable on windows.
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
return
end
return 'make install_jsregexp'
end)(),
build = 'make install_jsregexp',
dependencies = {
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
-- {
-- 'rafamadriz/friendly-snippets',
-- config = function()
-- require('luasnip.loaders.from_vscode').lazy_load()
-- end,
-- },
{
'rafamadriz/friendly-snippets',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
},
},
},
'saadparwaiz1/cmp_luasnip',

-- Adds other completion capabilities.
-- nvim-cmp does not ship with all sources by default. They are split
-- into multiple repos for maintenance purposes.
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
'onsails/lspkind.nvim',
'hrsh7th/cmp-buffer',
},
config = function()
-- See `:help cmp`
local cmp = require 'cmp'
local luasnip = require 'luasnip'
local lspkind = require 'lspkind'

lspkind.init {}
luasnip.config.setup {}

cmp.setup {
-- Enable luasnip to handle snippet expansion for nvim-cmp
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},

preselect = 'item',

completion = { completeopt = 'menu,menuone,noinsert' },

-- For an understanding of why these mappings were
Expand Down Expand Up @@ -100,6 +95,8 @@ return {

-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
--
-- cmp.status(),
},
sources = {
{
Expand All @@ -110,6 +107,7 @@ return {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
{ name = 'buffer' },
},
}
end,
Expand Down
Loading