add debug ide
This commit is contained in:
parent
6cb69751c4
commit
5d30cd8d4e
63
init.lua
63
init.lua
|
@ -1,4 +1,3 @@
|
|||
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
|
@ -45,7 +44,7 @@ require('lazy').setup({
|
|||
|
||||
-- Useful status updates for LSP
|
||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||
{ 'j-hui/fidget.nvim', branch = "legacy", opts = { text = { done = "", spinner = "dots_negative", }, } },
|
||||
{ 'j-hui/fidget.nvim', branch = "legacy", opts = { text = { done = "", spinner = "dots_negative", }, } },
|
||||
|
||||
-- Additional lua configuration, makes nvim stuff amazing!
|
||||
'folke/neodev.nvim',
|
||||
|
@ -69,16 +68,17 @@ require('lazy').setup({
|
|||
'rafamadriz/friendly-snippets',
|
||||
-- Icons
|
||||
'onsails/lspkind.nvim',
|
||||
{'nvim-tree/nvim-web-devicons',
|
||||
config = function()
|
||||
require'nvim-web-devicons'.get_icons()
|
||||
end
|
||||
{
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
config = function()
|
||||
require 'nvim-web-devicons'.get_icons()
|
||||
end
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Useful plugin to show you pending keybinds.
|
||||
{ 'folke/which-key.nvim', opts = {} },
|
||||
{ 'folke/which-key.nvim', opts = {} },
|
||||
{
|
||||
-- Adds git releated signs to the gutter, as well as utilities for managing changes
|
||||
'lewis6991/gitsigns.nvim',
|
||||
|
@ -92,7 +92,8 @@ require('lazy').setup({
|
|||
changedelete = { text = '~' },
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
vim.keymap.set('n', '<leader>gp', require('gitsigns').prev_hunk, { buffer = bufnr, desc = '[G]o to [P]revious Hunk' })
|
||||
vim.keymap.set('n', '<leader>gp', require('gitsigns').prev_hunk,
|
||||
{ buffer = bufnr, desc = '[G]o to [P]revious Hunk' })
|
||||
vim.keymap.set('n', '<leader>gn', require('gitsigns').next_hunk, { buffer = bufnr, desc = '[G]o to [N]ext Hunk' })
|
||||
vim.keymap.set('n', '<leader>ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' })
|
||||
end,
|
||||
|
@ -110,7 +111,7 @@ require('lazy').setup({
|
|||
-- See `:help lualine.txt`
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
icons_enabled = false,
|
||||
component_separators = '|',
|
||||
section_separators = '',
|
||||
},
|
||||
|
@ -129,7 +130,7 @@ require('lazy').setup({
|
|||
},
|
||||
|
||||
-- "gc" to comment visual regions/lines
|
||||
{ 'numToStr/Comment.nvim', opts = {} },
|
||||
{ 'numToStr/Comment.nvim', opts = {} },
|
||||
|
||||
-- Fuzzy Finder (files, lsp, etc)
|
||||
{ 'nvim-telescope/telescope.nvim', branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim' } },
|
||||
|
@ -160,8 +161,8 @@ require('lazy').setup({
|
|||
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
||||
-- These are some example plugins that I've included in the kickstart repository.
|
||||
-- Uncomment any of the lines below to enable them.
|
||||
-- require 'kickstart.plugins.autoformat',
|
||||
-- require 'kickstart.plugins.debug',
|
||||
require 'kickstart.plugins.autoformat',
|
||||
require 'kickstart.plugins.debug',
|
||||
|
||||
-- NOTE: The import below automatically adds your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
|
||||
|
@ -341,16 +342,16 @@ vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open float
|
|||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
||||
|
||||
local sign = function(opts)
|
||||
vim.fn.sign_define(opts.name, {
|
||||
texthl = opts.name,
|
||||
text = opts.text,
|
||||
numhl = ''
|
||||
})
|
||||
vim.fn.sign_define(opts.name, {
|
||||
texthl = opts.name,
|
||||
text = opts.text,
|
||||
numhl = ''
|
||||
})
|
||||
end
|
||||
sign({name = 'DiagnosticSignError', text = '✘'})
|
||||
sign({name = 'DiagnosticSignWarn', text = ''})
|
||||
sign({name = 'DiagnosticSignHint', text = ''})
|
||||
sign({name = 'DiagnosticSignInfo', text = ''})
|
||||
sign({ name = 'DiagnosticSignError', text = '✘' })
|
||||
sign({ name = 'DiagnosticSignWarn', text = '' })
|
||||
sign({ name = 'DiagnosticSignHint', text = '' })
|
||||
sign({ name = 'DiagnosticSignInfo', text = '' })
|
||||
|
||||
-- [[ Configure LSP ]]
|
||||
-- This function gets run when an LSP connects to a particular buffer.
|
||||
|
@ -487,23 +488,23 @@ cmp.setup {
|
|||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'path'},
|
||||
{ name = 'path' },
|
||||
},
|
||||
formatting = {
|
||||
-- changing the order of fields so the icon is the first
|
||||
fields = {"kind", 'abbr', "menu"},
|
||||
-- fields = {"abbr", "menu"},
|
||||
view = {
|
||||
entries = "wildmenu" -- can be "custom", "wildmenu" or "native"
|
||||
},
|
||||
-- changing the order of fields so the icon is the first
|
||||
fields = { "kind", 'abbr', "menu" },
|
||||
-- fields = {"abbr", "menu"},
|
||||
view = {
|
||||
entries = "wildmenu" -- can be "custom", "wildmenu" or "native"
|
||||
},
|
||||
|
||||
-- here is where the change happens
|
||||
format = lspkind.cmp_format({
|
||||
-- here is where the change happens
|
||||
format = lspkind.cmp_format({
|
||||
mode = 'symbol', -- show only symbol annotations
|
||||
menu = ({
|
||||
nvim_lsp = "[LSP]",
|
||||
luasnip = "[LuaSnip]",
|
||||
buffer = "[Buffer]",}),
|
||||
buffer = "[Buffer]", }),
|
||||
preset = 'codicons',
|
||||
}),
|
||||
}
|
||||
|
|
|
@ -1,44 +1,33 @@
|
|||
-- [[ insert your plugins below ]]
|
||||
|
||||
return {
|
||||
-- [[ Null ]]
|
||||
({'jose-elias-alvarez/null-ls.nvim',
|
||||
config = function ()
|
||||
local null_ls = require("null-ls")
|
||||
-- [[ Eyecandy & fancy prgramming stuff ]]
|
||||
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.diagnostics.eslint,
|
||||
null_ls.builtins.completion.spell,
|
||||
},
|
||||
})
|
||||
end
|
||||
}),
|
||||
-- [[ Eyecandy & fancy prgramming stuff ]]
|
||||
{ 'tpope/vim-sleuth' }, -- Detect tabstop and shiftwidth automatically
|
||||
|
||||
{'tpope/vim-sleuth'}, -- Detect tabstop and shiftwidth automatically
|
||||
{ 'matze/vim-move' },
|
||||
|
||||
{'matze/vim-move'},
|
||||
|
||||
{'windwp/nvim-autopairs',
|
||||
config = function ()
|
||||
require('nvim-autopairs').setup()
|
||||
end
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
config = function()
|
||||
require('nvim-autopairs').setup()
|
||||
end
|
||||
},
|
||||
|
||||
{'tpope/vim-surround'},
|
||||
{ 'tpope/vim-surround' },
|
||||
|
||||
{'lilydjwg/colorizer'},
|
||||
{ 'lilydjwg/colorizer' },
|
||||
|
||||
{'stevearc/dressing.nvim',
|
||||
config = function()
|
||||
require('dressing').setup()
|
||||
end
|
||||
{
|
||||
'stevearc/dressing.nvim',
|
||||
config = function()
|
||||
require('dressing').setup()
|
||||
end
|
||||
},
|
||||
|
||||
{"yamatsum/nvim-cursorline",
|
||||
config = function()
|
||||
{
|
||||
"yamatsum/nvim-cursorline",
|
||||
config = function()
|
||||
require('nvim-cursorline').setup {
|
||||
cursorline = {
|
||||
enable = false,
|
||||
|
@ -51,67 +40,69 @@ return {
|
|||
hl = { underline = true },
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
},
|
||||
|
||||
-- [[ Markdown Preview ]]
|
||||
|
||||
-- Preview in browser
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
build = "cd app && npm install",
|
||||
config = function()
|
||||
"iamcco/markdown-preview.nvim",
|
||||
build = "cd app && npm install",
|
||||
config = function()
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
vim.g.mkdp_page_title = "${name}"
|
||||
vim.g.mkdp_markdown_css = vim.fn.stdpath("config") .. "/assets/markdown.css"
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
},
|
||||
|
||||
-- Table mode
|
||||
-- https://github.com/dhruvasagar/vim-table-mode
|
||||
-- Table mode
|
||||
-- https://github.com/dhruvasagar/vim-table-mode
|
||||
{
|
||||
"dhruvasagar/vim-table-mode",
|
||||
ft = { "markdown" },
|
||||
config = function()
|
||||
-- Bug: changing prefix doesn't work https://github.com/dhruvasagar/vim-table-mode/issues/222
|
||||
-- :h table-mode-mappings
|
||||
-- For Markdown-compatible tables use
|
||||
vim.g.table_mode_map_prefix = "<localleader>t"
|
||||
vim.g.table_mode_corner = "|"
|
||||
-- vim.cmd("let g:table_mode_map_prefix = '<localleader>t'")
|
||||
-- vim.g.toggle_mode_options_toggle_map = "<localleader>tm"
|
||||
-- vim.g.table_mode_commands_tableize = "<localleader>tt"
|
||||
end,
|
||||
"dhruvasagar/vim-table-mode",
|
||||
ft = { "markdown" },
|
||||
config = function()
|
||||
-- Bug: changing prefix doesn't work https://github.com/dhruvasagar/vim-table-mode/issues/222
|
||||
-- :h table-mode-mappings
|
||||
-- For Markdown-compatible tables use
|
||||
vim.g.table_mode_map_prefix = "<localleader>t"
|
||||
vim.g.table_mode_corner = "|"
|
||||
-- vim.cmd("let g:table_mode_map_prefix = '<localleader>t'")
|
||||
-- vim.g.toggle_mode_options_toggle_map = "<localleader>tm"
|
||||
-- vim.g.table_mode_commands_tableize = "<localleader>tt"
|
||||
end,
|
||||
},
|
||||
|
||||
-- [[ notes ]]
|
||||
|
||||
{"renerocksai/telekasten.nvim",
|
||||
dependencies = {
|
||||
{'mzlogin/vim-markdown-toc'},
|
||||
{'renerocksai/calendar-vim'},
|
||||
},
|
||||
config = function()
|
||||
{
|
||||
"renerocksai/telekasten.nvim",
|
||||
dependencies = {
|
||||
{ 'mzlogin/vim-markdown-toc' },
|
||||
{ 'renerocksai/calendar-vim' },
|
||||
},
|
||||
config = function()
|
||||
require('telekasten').setup({
|
||||
home = vim.fn.expand("~/zettelkasten"), -- Put the name of your notes directory here
|
||||
home = vim.fn.expand("~/zettelkasten"), -- Put the name of your notes directory here
|
||||
})
|
||||
end
|
||||
end
|
||||
},
|
||||
|
||||
-- [[ Zen mode ]]
|
||||
{'folke/zen-mode.nvim',
|
||||
dependencies = {'folke/twilight.nvim'},
|
||||
config = function ()
|
||||
require("zen-mode").setup({
|
||||
window = {
|
||||
width = .75, -- width will be 85% of the editor width
|
||||
options = {
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
},
|
||||
}
|
||||
})
|
||||
end,
|
||||
{
|
||||
'folke/zen-mode.nvim',
|
||||
dependencies = { 'folke/twilight.nvim' },
|
||||
config = function()
|
||||
require("zen-mode").setup({
|
||||
window = {
|
||||
width = .75, -- width will be 85% of the editor width
|
||||
options = {
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
},
|
||||
}
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ return {
|
|||
}
|
||||
-- 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)
|
||||
|
||||
|
||||
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
|
||||
|
|
|
@ -31,6 +31,7 @@ vim.opt.showmode = false
|
|||
|
||||
-- Set colorscheme
|
||||
vim.o.termguicolors = true
|
||||
vim.g.forestbones = { transparent_background = true, }
|
||||
vim.cmd [[colorscheme gruvbones]]
|
||||
|
||||
local map = vim.api.nvim_set_keymap
|
||||
|
|
Loading…
Reference in New Issue