Skip to content

Commit 6105c10

Browse files
authored
Merge pull request #1 from Tevin79/dev
Refact and add plugs
2 parents d350db2 + caf0fee commit 6105c10

File tree

9 files changed

+224
-466
lines changed

9 files changed

+224
-466
lines changed

init.lua

Lines changed: 19 additions & 466 deletions
Large diffs are not rendered by default.

lua/custom/plugins/copilot.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
return {
2+
'github/copilot.vim',
3+
}

lua/custom/plugins/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
-- I promise not to create any merge conflicts in this directory :)
33
--
44
-- See the kickstart.nvim README for more information
5+
56
return {}

lua/custom/plugins/rose-pine.lua

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
return {
2+
'rose-pine/neovim',
3+
name = 'rose-pine',
4+
config = function()
5+
require('rose-pine').setup {
6+
variant = 'auto', -- auto, main, moon, or dawn
7+
dark_variant = 'main', -- main, moon, or dawn
8+
dim_inactive_windows = false,
9+
extend_background_behind_borders = true,
10+
11+
enable = {
12+
terminal = true,
13+
legacy_highlights = true, -- Improve compatibility for previous versions of Neovim
14+
migrations = true, -- Handle deprecated options automatically
15+
},
16+
17+
styles = {
18+
bold = true,
19+
italic = true,
20+
transparency = true,
21+
},
22+
23+
groups = {
24+
border = 'muted',
25+
link = 'iris',
26+
panel = 'surface',
27+
28+
error = 'love',
29+
hint = 'iris',
30+
info = 'foam',
31+
note = 'pine',
32+
todo = 'rose',
33+
warn = 'gold',
34+
35+
git_add = 'foam',
36+
git_change = 'rose',
37+
git_delete = 'love',
38+
git_dirty = 'rose',
39+
git_ignore = 'muted',
40+
git_merge = 'iris',
41+
git_rename = 'pine',
42+
git_stage = 'iris',
43+
git_text = 'rose',
44+
git_untracked = 'subtle',
45+
46+
h1 = 'iris',
47+
h2 = 'foam',
48+
h3 = 'rose',
49+
h4 = 'gold',
50+
h5 = 'pine',
51+
h6 = 'foam',
52+
},
53+
54+
palette = {},
55+
56+
highlight_groups = {},
57+
}
58+
59+
vim.cmd 'colorscheme rose-pine'
60+
end,
61+
}

lua/custom/plugins/undotree.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
return {
2+
'mbbill/undotree',
3+
}

lua/custom/plugins/vimtex.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
return {
2+
'lervag/vimtex',
3+
lazy = false, -- we don't want to lazy load VimTeX
4+
init = function()
5+
-- VimTeX configuration goes here, e.g.
6+
vim.g.vimtex_view_method = 'zathura'
7+
end,
8+
}

lua/custom/remap.lua

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
-- vim.keymap.set('n', '!', '_') -- For macos only
2+
3+
-- Center the view when moving
4+
vim.keymap.set('n', '<C-d>', '<C-d>zz')
5+
vim.keymap.set('n', '<C-u>', '<C-u>zz')
6+
7+
-- Access to file viewer easily
8+
vim.keymap.set('n', '<leader>pv', vim.cmd.Ex, { desc = '[P]roject files [V]iewer' })
9+
10+
vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' })
11+
vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' })
12+
13+
-- Undotree
14+
vim.keymap.set('n', '<F5>', vim.cmd.UndotreeToggle)
15+
16+
-- [[ Basic Keymaps ]]
17+
-- See `:help vim.keymap.set()`
18+
19+
-- Clear highlights on search when pressing <Esc> in normal mode
20+
-- See `:help hlsearch`
21+
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
22+
23+
-- Diagnostic keymaps
24+
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
25+
26+
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
27+
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
28+
-- is not what someone will guess without a bit more experience.
29+
--
30+
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
31+
-- or just use <C-\><C-n> to exit terminal mode
32+
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
33+
34+
-- TIP: Disable arrow keys in normal mode
35+
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
36+
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
37+
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
38+
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
39+
40+
-- Keybinds to make split navigation easier.
41+
-- Use CTRL+<hjkl> to switch between windows
42+
--
43+
-- See `:help wincmd` for a list of all window commands
44+
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
45+
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
46+
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
47+
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
48+
49+
-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
50+
-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
51+
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
52+
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
53+
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })

lua/custom/sets.lua

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
-- Set to true if you have a Nerd Font installed and selected in the terminal
2+
vim.g.have_nerd_font = true
3+
4+
-- [[ Setting options ]]
5+
-- See `:help vim.opt`
6+
-- NOTE: You can change these options as you wish!
7+
-- For more options, you can see `:help option-list`
8+
9+
-- Make line numbers default
10+
vim.opt.number = true
11+
-- You can also add relative line numbers, to help with jumping.
12+
-- Experiment for yourself to see if you like it!
13+
vim.opt.relativenumber = true
14+
15+
-- Enable mouse mode, can be useful for resizing splits for example!
16+
vim.opt.mouse = 'a'
17+
18+
-- Don't show the mode, since it's already in the status line
19+
vim.opt.showmode = false
20+
21+
-- Sync clipboard between OS and Neovim.
22+
-- Schedule the setting after `UiEnter` because it can increase startup-time.
23+
-- Remove this option if you want your OS clipboard to remain independent.
24+
-- See `:help 'clipboard'`
25+
vim.schedule(function()
26+
vim.opt.clipboard = 'unnamedplus'
27+
end)
28+
29+
-- Enable break indent
30+
vim.opt.breakindent = true
31+
32+
-- Save undo history
33+
vim.opt.undofile = true
34+
35+
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
36+
vim.opt.ignorecase = true
37+
vim.opt.smartcase = true
38+
39+
-- Keep signcolumn on by default
40+
vim.opt.signcolumn = 'yes'
41+
42+
-- Decrease update time
43+
vim.opt.updatetime = 250
44+
45+
-- Decrease mapped sequence wait time
46+
vim.opt.timeoutlen = 300
47+
48+
-- Configure how new splits should be opened
49+
vim.opt.splitright = true
50+
vim.opt.splitbelow = true
51+
52+
-- Sets how neovim will display certain whitespace characters in the editor.
53+
-- See `:help 'list'`
54+
-- and `:help 'listchars'`
55+
vim.opt.list = true
56+
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
57+
58+
-- Preview substitutions live, as you type!
59+
vim.opt.inccommand = 'split'
60+
61+
-- Show which line your cursor is on
62+
vim.opt.cursorline = true
63+
64+
-- Minimal number of screen lines to keep above and below the cursor.
65+
vim.opt.scrolloff = 10
66+
67+
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
68+
-- instead raise a dialog asking if you wish to save the current file(s)
69+
-- See `:help 'confirm'`
70+
vim.opt.confirm = true

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)