Skip to content

Commit 1a7dacc

Browse files
committed
Refactors for tests, debug and neotree
1 parent cb546c0 commit 1a7dacc

12 files changed

Lines changed: 335 additions & 45 deletions

File tree

init.lua

Lines changed: 55 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ vim.g.maplocalleader = ' '
77
-- Set to true if you have a Nerd Font installed and selected in the terminal
88
vim.g.have_nerd_font = true
99

10+
-- Set global theme
11+
vim.g.theme = 'oxocarbon'
12+
1013
-- [[ Setting options ]]
1114
-- See `:help vim.opt`
1215
-- NOTE: You can change these options as you wish!
@@ -139,6 +142,7 @@ vim.opt.rtp:prepend(lazypath)
139142
-- To update plugins you can run
140143
-- :Lazy update
141144
--
145+
--
142146
-- NOTE: Here is where you install your plugins.
143147
require('lazy').setup({
144148
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
@@ -158,16 +162,7 @@ require('lazy').setup({
158162
-- See `:help gitsigns` to understand what the configuration keys do
159163
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
160164
'lewis6991/gitsigns.nvim',
161-
opts = {
162-
signs = {
163-
add = { text = '' },
164-
change = { text = '' },
165-
delete = { text = '_' },
166-
topdelete = { text = '' },
167-
changedelete = { text = '~' },
168-
untracked = { text = '' },
169-
},
170-
},
165+
opts = {},
171166
},
172167

173168
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
@@ -592,9 +587,11 @@ require('lazy').setup({
592587
vim.list_extend(ensure_installed, {
593588
'stylua', -- Used to format Lua code
594589
'black', -- Used to format python code
595-
'sonarlint-language-server', -- Helpful linting and diagnostics
590+
'debugpy', -- Python Debugger
596591
'css-lsp', -- css
597592
'emmet-language-server', -- emmet
593+
'sonarlint-language-server', -- Helpful linting and diagnostics
594+
'markdownlint',
598595
})
599596
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
600597

@@ -792,17 +789,35 @@ require('lazy').setup({
792789
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
793790
'folke/tokyonight.nvim',
794791
priority = 1000, -- Make sure to load this before all the other start plugins.
795-
init = function()
796-
-- Load the colorscheme here.
797-
-- Like many other themes, this one has different styles, and you could load
798-
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
799-
vim.cmd.colorscheme 'tokyonight-night'
800-
801-
-- You can configure highlights by doing something like:
802-
vim.cmd.hi 'Comment gui=none'
792+
-- init = function()
793+
-- -- Load the colorscheme here.
794+
-- -- Like many other themes, this one has different styles, and you could load
795+
-- -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
796+
-- vim.cmd.colorscheme 'tokyonight-night'
797+
--
798+
-- -- You can configure highlights by doing something like:
799+
-- vim.cmd.hi 'Comment gui=none'
800+
-- end,
801+
},
802+
{
803+
'Mofiqul/adwaita.nvim',
804+
lazy = false,
805+
priority = 1000,
806+
config = function()
807+
vim.cmd.colorscheme(vim.g.theme)
803808
end,
804809
},
805-
810+
{
811+
'uloco/bluloco.nvim',
812+
lazy = false,
813+
priority = 1000,
814+
dependencies = { 'rktjmp/lush.nvim' },
815+
},
816+
{
817+
'nyoom-engineering/oxocarbon.nvim',
818+
lazy = false,
819+
priority = 1000,
820+
},
806821
-- Highlight todo, notes, etc in comments
807822
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
808823

@@ -824,21 +839,7 @@ require('lazy').setup({
824839
-- - sr)' - [S]urround [R]eplace [)] [']
825840
require('mini.surround').setup()
826841

827-
-- Simple and easy statusline.
828-
-- You could remove this setup call if you don't like it,
829-
-- and try some other statusline plugin
830-
local statusline = require 'mini.statusline'
831-
-- set use_icons to true if you have a Nerd Font
832-
statusline.setup { use_icons = vim.g.have_nerd_font }
833-
834-
-- You can configure sections in the statusline by overriding their
835-
-- default behavior. For example, here we set the section for
836-
-- cursor location to LINE:COLUMN
837-
---@diagnostic disable-next-line: duplicate-set-field
838-
statusline.section_location = function()
839-
return '%2l:%-2v'
840-
end
841-
842+
require('mini.icons').setup()
842843
-- ... and there is more!
843844
-- Check out: https://github.com/echasnovski/mini.nvim
844845
end,
@@ -849,7 +850,22 @@ require('lazy').setup({
849850
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
850851
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
851852
opts = {
852-
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
853+
ensure_installed = {
854+
'bash',
855+
'c',
856+
'diff',
857+
'html',
858+
'lua',
859+
'luadoc',
860+
'markdown',
861+
'markdown_inline',
862+
'query',
863+
'vim',
864+
'vimdoc',
865+
'javascript',
866+
'typescript',
867+
'jsdoc',
868+
},
853869
-- Autoinstall languages that are not installed
854870
auto_install = true,
855871
highlight = {
@@ -913,5 +929,8 @@ require('lazy').setup({
913929
},
914930
})
915931

932+
-- Setup python provider
933+
vim.g.python3_host_prog = '$HOME/.asdf/shims/python'
934+
916935
-- The line beneath this is called `modeline`. See `:help modeline`
917936
-- vim: ts=2 sts=2 sw=2 et

lua/custom/plugins/copilot.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
return {
2+
'zbirenbaum/copilot.lua',
3+
cmd = 'Copilot',
4+
build = ':Copilot auth',
5+
opts = {
6+
suggestion = { enabled = false },
7+
panel = { enabled = false },
8+
filetypes = {
9+
markdown = true,
10+
help = true,
11+
},
12+
},
13+
}

lua/custom/plugins/lualine.lua

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
return {
2+
'nvim-lualine/lualine.nvim',
3+
dependencies = { 'nvim-tree/nvim-web-devicons' },
4+
opts = {
5+
options = {
6+
icons_enabled = vim.g.have_nerd_font,
7+
theme = 'auto',
8+
9+
-- Sections
10+
section_separators = '',
11+
component_separators = '|',
12+
},
13+
sections = {
14+
lualine_a = { 'branch', { 'diff', colored = false } },
15+
lualine_b = { { 'diagnostics', sources = { 'nvim_diagnostic' } } },
16+
lualine_c = { { 'filename', file_status = true, newfile_status = true, path = 0 } },
17+
lualine_x = { 'encoding', 'fileformat', 'filetype' },
18+
lualine_y = {
19+
{
20+
require('noice').api.status.mode.get,
21+
cond = require('noice').api.status.mode.has,
22+
color = { fg = '#ff9e64' },
23+
},
24+
'mode',
25+
},
26+
lualine_z = { 'location' },
27+
},
28+
},
29+
}

lua/custom/plugins/noice.lua

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
return {
2+
'folke/noice.nvim',
3+
event = 'VeryLazy',
4+
opts = {
5+
lsp = {
6+
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
7+
override = {
8+
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
9+
['vim.lsp.util.stylize_markdown'] = true,
10+
['cmp.entry.get_documentation'] = true, -- requires hrsh7th/nvim-cmp
11+
},
12+
},
13+
-- you can enable a preset for easier configuration
14+
cmdline = {
15+
view = 'cmdline',
16+
},
17+
presets = {
18+
long_message_to_split = false, -- long messages will be sent to a split
19+
inc_rename = true, -- enables an input dialog for inc-rename.nvim
20+
lsp_doc_border = false, -- add a border to hover docs and signature help
21+
},
22+
},
23+
dependencies = {
24+
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
25+
'MunifTanjim/nui.nvim',
26+
},
27+
}

lua/custom/plugins/trouble.lua

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
return {
2+
'folke/trouble.nvim',
3+
cmd = { 'Trouble' },
4+
opts = {
5+
modes = {
6+
lsp = {
7+
win = { position = 'right' },
8+
},
9+
},
10+
},
11+
keys = {
12+
{ '<leader>xx', '<cmd>Trouble diagnostics toggle<cr>', desc = 'Diagnostics (Trouble)' },
13+
{ '<leader>xX', '<cmd>Trouble diagnostics toggle filter.buf=0<cr>', desc = 'Buffer Diagnostics (Trouble)' },
14+
{ '<leader>cs', '<cmd>Trouble symbols toggle<cr>', desc = 'Symbols (Trouble)' },
15+
{ '<leader>cS', '<cmd>Trouble lsp toggle<cr>', desc = 'LSP references/definitions/... (Trouble)' },
16+
{ '<leader>xL', '<cmd>Trouble loclist toggle<cr>', desc = 'Location List (Trouble)' },
17+
{ '<leader>xQ', '<cmd>Trouble qflist toggle<cr>', desc = 'Quickfix List (Trouble)' },
18+
{
19+
'[q',
20+
function()
21+
if require('trouble').is_open() then
22+
require('trouble').prev { skip_groups = true, jump = true }
23+
else
24+
local ok, err = pcall(vim.cmd.cprev)
25+
if not ok then
26+
vim.notify(err, vim.log.levels.ERROR)
27+
end
28+
end
29+
end,
30+
desc = 'Previous Trouble/Quickfix Item',
31+
},
32+
{
33+
']q',
34+
function()
35+
if require('trouble').is_open() then
36+
require('trouble').next { skip_groups = true, jump = true }
37+
else
38+
local ok, err = pcall(vim.cmd.cnext)
39+
if not ok then
40+
vim.notify(err, vim.log.levels.ERROR)
41+
end
42+
end
43+
end,
44+
desc = 'Next Trouble/Quickfix Item',
45+
},
46+
},
47+
}

lua/custom/plugins/vim-test.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
return {
22
'vim-test/vim-test',
3-
opts = {},
3+
lazy = false,
4+
config = function()
5+
require('which-key').add {
6+
{ '<leader>r', name = '[R]un tests', desc = 'which_key_ignore' },
7+
}
8+
end,
49
keys = {
510
{
611
'<leader>rt',

lua/custom/plugins/vimtex.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
return {
2+
'lervag/vimtex',
3+
lazy = false,
4+
opt = {},
5+
}

lua/custom/plugins/wilder.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-- if true then
2+
-- return {}
3+
-- end
4+
5+
return {
6+
'gelguy/wilder.nvim',
7+
opts = {},
8+
config = function()
9+
local wilder = require 'wilder'
10+
wilder.setup { modes = { ':', '/', '?' } }
11+
end,
12+
}

lua/custom/plugins/zen-mode.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
return {
2+
'folke/zen-mode.nvim',
3+
opts = {
4+
-- pass
5+
},
6+
}

0 commit comments

Comments
 (0)