mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-26 13:21:45 +00:00
Compare commits
5 Commits
092aa53b00
...
eb48ce27f5
Author | SHA1 | Date | |
---|---|---|---|
eb48ce27f5 | |||
ca7c6260fc | |||
48f8fd251d | |||
afb45182b2 | |||
e8213b12a2 |
15
lua/custom/plugins/conflictmarker.lua
Normal file
15
lua/custom/plugins/conflictmarker.lua
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-- Disable the default highlight group
|
||||||
|
vim.g.conflict_marker_highlight_group = ''
|
||||||
|
|
||||||
|
-- Include text after begin and end markers
|
||||||
|
vim.g.conflict_marker_begin = '^<<<<<<< .*$'
|
||||||
|
vim.g.conflict_marker_end = '^>>>>>>> .*$'
|
||||||
|
|
||||||
|
-- Highlight groups
|
||||||
|
vim.cmd 'highlight ConflictMarkerBegin guibg=#2f7366'
|
||||||
|
vim.cmd 'highlight ConflictMarkerOurs guibg=#2e5049'
|
||||||
|
vim.cmd 'highlight ConflictMarkerTheirs guibg=#344f69'
|
||||||
|
vim.cmd 'highlight ConflictMarkerEnd guibg=#2f628e'
|
||||||
|
vim.cmd 'highlight ConflictMarkerCommonAncestorsHunk guibg=#754a81'
|
||||||
|
|
||||||
|
return { 'rhysd/conflict-marker.vim' }
|
@ -20,7 +20,7 @@ end
|
|||||||
|
|
||||||
local check_external_reqs = function()
|
local check_external_reqs = function()
|
||||||
-- Basic utils: `git`, `make`, `unzip`
|
-- Basic utils: `git`, `make`, `unzip`
|
||||||
for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
|
for _, exe in ipairs { 'git', 'cmake', 'rg' } do
|
||||||
local is_executable = vim.fn.executable(exe) == 1
|
local is_executable = vim.fn.executable(exe) == 1
|
||||||
if is_executable then
|
if is_executable then
|
||||||
vim.health.ok(string.format("Found executable: '%s'", exe))
|
vim.health.ok(string.format("Found executable: '%s'", exe))
|
||||||
|
@ -10,10 +10,10 @@ return {
|
|||||||
-- Build Step is needed for regex support in snippets
|
-- Build Step is needed for regex support in snippets
|
||||||
-- This step is not supported in many windows environments
|
-- This step is not supported in many windows environments
|
||||||
-- Remove the below condition to re-enable on windows
|
-- Remove the below condition to re-enable on windows
|
||||||
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
|
if vim.fn.has 'win32' == 1 or vim.fn.executable 'cmake' == 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
return 'make install_jsregexp'
|
return 'cmake install_jsregexp'
|
||||||
end)(),
|
end)(),
|
||||||
},
|
},
|
||||||
'saadparwaiz1/cmp_luasnip',
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
@ -1,66 +1,66 @@
|
|||||||
return {
|
return {
|
||||||
'mfussenegger/nvim-dap',
|
'mfussenegger/nvim-dap',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Creates a beautiful debugger UI
|
-- Creates a beautiful debugger UI
|
||||||
'rcarriga/nvim-dap-ui',
|
'rcarriga/nvim-dap-ui',
|
||||||
|
|
||||||
-- Installs the debug adapters for you
|
-- Installs the debug adapters for you
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
'jay-babu/mason-nvim-dap.nvim',
|
'jay-babu/mason-nvim-dap.nvim',
|
||||||
|
|
||||||
-- Debugger dependencies
|
-- Debugger dependencies
|
||||||
'leoluz/nvim-dap-go',
|
'leoluz/nvim-dap-go',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require 'dap'
|
local dap = require 'dap'
|
||||||
local dapui = require 'dapui'
|
local dapui = require 'dapui'
|
||||||
|
|
||||||
require('mason-nvim-dap').setup {
|
require('mason-nvim-dap').setup {
|
||||||
automatic_setup = false,
|
automatic_setup = false,
|
||||||
handlers = {},
|
handlers = {},
|
||||||
-- Installed language debuggers
|
-- Installed language debuggers
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
'node-debug2-adapter',
|
'node-debug2-adapter',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Basic debugging keymaps, feel free to change to your liking!
|
-- Basic debugging keymaps, feel free to change to your liking!
|
||||||
vim.keymap.set('n', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
|
vim.keymap.set('n', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
|
||||||
vim.keymap.set('n', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
|
vim.keymap.set('n', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
|
||||||
vim.keymap.set('n', '<F2>', dap.step_over, { desc = 'Debug: Step Over' })
|
vim.keymap.set('n', '<F2>', dap.step_over, { desc = 'Debug: Step Over' })
|
||||||
vim.keymap.set('n', '<F3>', dap.step_out, { desc = 'Debug: Step Out' })
|
vim.keymap.set('n', '<F3>', dap.step_out, { desc = 'Debug: Step Out' })
|
||||||
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
|
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
|
||||||
vim.keymap.set('n', '<leader>B', function()
|
vim.keymap.set('n', '<leader>B', function()
|
||||||
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||||
end, { desc = 'Debug: Set Breakpoint' })
|
end, { desc = 'Debug: Set Breakpoint' })
|
||||||
|
|
||||||
-- Dap UI setup
|
-- Dap UI setup
|
||||||
dapui.setup {
|
dapui.setup {
|
||||||
-- Set icons to characters that are more likely to work in every terminal.
|
-- Set icons to characters that are more likely to work in every terminal.
|
||||||
icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
|
icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
|
||||||
controls = {
|
controls = {
|
||||||
icons = {
|
icons = {
|
||||||
pause = '⏸',
|
pause = '⏸',
|
||||||
play = '▶',
|
play = '▶',
|
||||||
step_into = '⏎',
|
step_into = '⏎',
|
||||||
step_over = '⏭',
|
step_over = '⏭',
|
||||||
step_out = '⏮',
|
step_out = '⏮',
|
||||||
step_back = 'b',
|
step_back = 'b',
|
||||||
run_last = '▶▶',
|
run_last = '▶▶',
|
||||||
terminate = '⏹',
|
terminate = '⏹',
|
||||||
disconnect = '⏏',
|
disconnect = '⏏',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
||||||
vim.keymap.set('n', '<F7>', dapui.toggle, { desc = 'Debug: See last session result.' })
|
vim.keymap.set('n', '<F7>', dapui.toggle, { desc = 'Debug: See last session result.' })
|
||||||
|
|
||||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||||
|
|
||||||
-- Install golang specific config
|
-- Install golang specific config
|
||||||
-- require('dap-go').setup()
|
-- require('dap-go').setup()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ return {
|
|||||||
-- Fuzzy find all the symbols in your current workspace
|
-- Fuzzy find all the symbols in your current workspace
|
||||||
-- Similar to document symbols, except searches over your whole project.
|
-- Similar to document symbols, except searches over your whole project.
|
||||||
map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||||
-- Lesser used LSP functionality
|
-- Workspace functionality dependant on LSPs
|
||||||
map('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
|
map('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
|
||||||
map('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
|
map('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
|
||||||
|
|
||||||
@ -136,6 +136,7 @@ return {
|
|||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
|
tailwindcss = {},
|
||||||
omnisharp = {},
|
omnisharp = {},
|
||||||
tsserver = {},
|
tsserver = {},
|
||||||
pyright = {},
|
pyright = {},
|
||||||
@ -184,6 +185,10 @@ return {
|
|||||||
local ensure_installed = vim.tbl_keys(servers or {})
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
vim.list_extend(ensure_installed, {
|
vim.list_extend(ensure_installed, {
|
||||||
'stylua', -- Used to format lua code
|
'stylua', -- Used to format lua code
|
||||||
|
'eslint_d',
|
||||||
|
'prettier',
|
||||||
|
'prettierd',
|
||||||
|
'node-debug2-adapter',
|
||||||
})
|
})
|
||||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ return {
|
|||||||
-- `cond` is a condition used to determine whether this plugin should be
|
-- `cond` is a condition used to determine whether this plugin should be
|
||||||
-- installed and loaded.
|
-- installed and loaded.
|
||||||
cond = function()
|
cond = function()
|
||||||
return vim.fn.executable 'make' == 1
|
return vim.fn.executable 'cmake' == 1
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||||
|
Loading…
Reference in New Issue
Block a user