mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-27 05:41: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()
|
||||
-- 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
|
||||
if is_executable then
|
||||
vim.health.ok(string.format("Found executable: '%s'", exe))
|
||||
|
@ -10,10 +10,10 @@ return {
|
||||
-- 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
|
||||
if vim.fn.has 'win32' == 1 or vim.fn.executable 'cmake' == 0 then
|
||||
return
|
||||
end
|
||||
return 'make install_jsregexp'
|
||||
return 'cmake install_jsregexp'
|
||||
end)(),
|
||||
},
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
|
@ -1,66 +1,66 @@
|
||||
return {
|
||||
'mfussenegger/nvim-dap',
|
||||
dependencies = {
|
||||
-- Creates a beautiful debugger UI
|
||||
'rcarriga/nvim-dap-ui',
|
||||
'mfussenegger/nvim-dap',
|
||||
dependencies = {
|
||||
-- Creates a beautiful debugger UI
|
||||
'rcarriga/nvim-dap-ui',
|
||||
|
||||
-- Installs the debug adapters for you
|
||||
'williamboman/mason.nvim',
|
||||
'jay-babu/mason-nvim-dap.nvim',
|
||||
-- Installs the debug adapters for you
|
||||
'williamboman/mason.nvim',
|
||||
'jay-babu/mason-nvim-dap.nvim',
|
||||
|
||||
-- Debugger dependencies
|
||||
'leoluz/nvim-dap-go',
|
||||
},
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
-- Debugger dependencies
|
||||
'leoluz/nvim-dap-go',
|
||||
},
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
|
||||
require('mason-nvim-dap').setup {
|
||||
automatic_setup = false,
|
||||
handlers = {},
|
||||
-- Installed language debuggers
|
||||
ensure_installed = {
|
||||
'node-debug2-adapter',
|
||||
},
|
||||
}
|
||||
require('mason-nvim-dap').setup {
|
||||
automatic_setup = false,
|
||||
handlers = {},
|
||||
-- Installed language debuggers
|
||||
ensure_installed = {
|
||||
'node-debug2-adapter',
|
||||
},
|
||||
}
|
||||
|
||||
-- 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', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
|
||||
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', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
|
||||
vim.keymap.set('n', '<leader>B', function()
|
||||
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||
end, { desc = 'Debug: Set Breakpoint' })
|
||||
-- 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', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
|
||||
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', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
|
||||
vim.keymap.set('n', '<leader>B', function()
|
||||
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||
end, { desc = 'Debug: Set Breakpoint' })
|
||||
|
||||
-- Dap UI setup
|
||||
dapui.setup {
|
||||
-- Set icons to characters that are more likely to work in every terminal.
|
||||
icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
|
||||
controls = {
|
||||
icons = {
|
||||
pause = '⏸',
|
||||
play = '▶',
|
||||
step_into = '⏎',
|
||||
step_over = '⏭',
|
||||
step_out = '⏮',
|
||||
step_back = 'b',
|
||||
run_last = '▶▶',
|
||||
terminate = '⏹',
|
||||
disconnect = '⏏',
|
||||
},
|
||||
},
|
||||
}
|
||||
-- Dap UI setup
|
||||
dapui.setup {
|
||||
-- Set icons to characters that are more likely to work in every terminal.
|
||||
icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
|
||||
controls = {
|
||||
icons = {
|
||||
pause = '⏸',
|
||||
play = '▶',
|
||||
step_into = '⏎',
|
||||
step_over = '⏭',
|
||||
step_out = '⏮',
|
||||
step_back = 'b',
|
||||
run_last = '▶▶',
|
||||
terminate = '⏹',
|
||||
disconnect = '⏏',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- 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.' })
|
||||
-- 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.' })
|
||||
|
||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||
|
||||
-- Install golang specific config
|
||||
-- require('dap-go').setup()
|
||||
end,
|
||||
-- Install golang specific config
|
||||
-- require('dap-go').setup()
|
||||
end,
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ return {
|
||||
-- Fuzzy find all the symbols in your current workspace
|
||||
-- Similar to document symbols, except searches over your whole project.
|
||||
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>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/
|
||||
local servers = {
|
||||
rust_analyzer = {},
|
||||
tailwindcss = {},
|
||||
omnisharp = {},
|
||||
tsserver = {},
|
||||
pyright = {},
|
||||
@ -184,6 +185,10 @@ return {
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua', -- Used to format lua code
|
||||
'eslint_d',
|
||||
'prettier',
|
||||
'prettierd',
|
||||
'node-debug2-adapter',
|
||||
})
|
||||
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
|
||||
-- installed and loaded.
|
||||
cond = function()
|
||||
return vim.fn.executable 'make' == 1
|
||||
return vim.fn.executable 'cmake' == 1
|
||||
end,
|
||||
},
|
||||
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||
|
Loading…
Reference in New Issue
Block a user