Skip to content

Commit b0112c0

Browse files
committed
refact
1 parent 89dad83 commit b0112c0

File tree

7 files changed

+102
-85
lines changed

7 files changed

+102
-85
lines changed

init.lua

Lines changed: 11 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,11 @@
44
vim.g.mapleader = ' '
55
vim.g.maplocalleader = ' '
66

7-
-- ( Custom remaps
8-
-- vim.keymap.set('n', '!', '_') -- For macos only
9-
10-
-- Center the view when moving
11-
vim.keymap.set('n', '<C-d>', '<C-d>zz')
12-
vim.keymap.set('n', '<C-u>', '<C-u>zz')
13-
14-
-- Access to file viewer easily
15-
vim.keymap.set('n', '<leader>pv', vim.cmd.Ex, { desc = '[P]roject files [V]iewer' })
16-
17-
vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' })
18-
vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' })
19-
20-
-- Undotree
21-
vim.keymap.set('n', '<F5>', vim.cmd.UndotreeToggle)
22-
23-
-- End of custom remaps )
7+
-- Custom remaps
8+
require 'custom.remap'
249

2510
-- Set to true if you have a Nerd Font installed and selected in the terminal
26-
vim.g.have_nerd_font = false
11+
vim.g.have_nerd_font = true
2712

2813
-- [[ Setting options ]]
2914
-- See `:help vim.opt`
@@ -171,12 +156,7 @@ vim.opt.rtp:prepend(lazypath)
171156
-- NOTE: Here is where you install your plugins.
172157
require('lazy').setup {
173158

174-
{
175-
'rose-pine/neovim',
176-
name = 'rose-pine',
177-
},
178-
179-
'mbbill/undotree',
159+
{ import = 'custom.plugins' },
180160

181161
'tpope/vim-sleuth',
182162

@@ -655,13 +635,17 @@ require('lazy').setup {
655635
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
656636
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
657637
opts = {
658-
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
638+
ensure_installed = { 'bibtex', 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
659639
auto_install = true,
660640
highlight = {
661641
enable = true,
662-
additional_vim_regex_highlighting = { 'ruby' },
642+
-- additional_vim_regex_highlighting = { 'ruby', 'latex' },
643+
disable = { 'latex' },
644+
},
645+
indent = {
646+
enable = true,
647+
disable = { 'ruby', 'latex' },
663648
},
664-
indent = { enable = true, disable = { 'ruby' } },
665649
},
666650
},
667651
ui = {
@@ -682,61 +666,3 @@ require('lazy').setup {
682666
},
683667
},
684668
}
685-
686-
require('rose-pine').setup {
687-
variant = 'auto', -- auto, main, moon, or dawn
688-
dark_variant = 'main', -- main, moon, or dawn
689-
dim_inactive_windows = false,
690-
extend_background_behind_borders = true,
691-
692-
enable = {
693-
terminal = true,
694-
legacy_highlights = true, -- Improve compatibility for previous versions of Neovim
695-
migrations = true, -- Handle deprecated options automatically
696-
},
697-
698-
styles = {
699-
bold = true,
700-
italic = true,
701-
transparency = true,
702-
},
703-
704-
groups = {
705-
border = 'muted',
706-
link = 'iris',
707-
panel = 'surface',
708-
709-
error = 'love',
710-
hint = 'iris',
711-
info = 'foam',
712-
note = 'pine',
713-
todo = 'rose',
714-
warn = 'gold',
715-
716-
git_add = 'foam',
717-
git_change = 'rose',
718-
git_delete = 'love',
719-
git_dirty = 'rose',
720-
git_ignore = 'muted',
721-
git_merge = 'iris',
722-
git_rename = 'pine',
723-
git_stage = 'iris',
724-
git_text = 'rose',
725-
git_untracked = 'subtle',
726-
727-
h1 = 'iris',
728-
h2 = 'foam',
729-
h3 = 'rose',
730-
h4 = 'gold',
731-
h5 = 'pine',
732-
h6 = 'foam',
733-
},
734-
735-
palette = {},
736-
737-
highlight_groups = {},
738-
739-
before_highlight = function(group, highlight, palette) end,
740-
}
741-
742-
vim.cmd 'colorscheme rose-pine'

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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +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+
6+
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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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)

0 commit comments

Comments
 (0)