feat: config update
This commit is contained in:
@@ -426,11 +426,11 @@ require('lazy').setup({
|
|||||||
|
|
||||||
-- Useful status updates for LSP.
|
-- Useful status updates for LSP.
|
||||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||||
{ 'j-hui/fidget.nvim', opts = {} },
|
-- { 'j-hui/fidget.nvim', opts = {} },
|
||||||
|
|
||||||
-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
|
-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
|
||||||
-- used for completion, annotations and signatures of Neovim apis
|
-- used for completion, annotations and signatures of Neovim apis
|
||||||
{ 'folke/neodev.nvim', opts = {} },
|
{ 'folke/lazydev.nvim', opts = {} },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- Brief aside: **What is LSP?**
|
-- Brief aside: **What is LSP?**
|
||||||
@@ -621,6 +621,7 @@ require('lazy').setup({
|
|||||||
'css-lsp',
|
'css-lsp',
|
||||||
'prettier',
|
'prettier',
|
||||||
'prettierd',
|
'prettierd',
|
||||||
|
'typescript-language-server',
|
||||||
-- Python
|
-- Python
|
||||||
'ruff',
|
'ruff',
|
||||||
'pyright',
|
'pyright',
|
||||||
@@ -638,6 +639,7 @@ require('lazy').setup({
|
|||||||
handlers = {
|
handlers = {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
local server = servers[server_name] or {}
|
local server = servers[server_name] or {}
|
||||||
|
|
||||||
-- This handles overriding only values explicitly passed
|
-- This handles overriding only values explicitly passed
|
||||||
-- by the server configuration above. Useful when disabling
|
-- by the server configuration above. Useful when disabling
|
||||||
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||||
@@ -682,9 +684,9 @@ require('lazy').setup({
|
|||||||
-- You can use a sub-list to tell conform to run *until* a formatter
|
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||||
-- is found.
|
-- is found.
|
||||||
markdown = { 'markdownlint', 'marksman' },
|
markdown = { 'markdownlint', 'marksman' },
|
||||||
javascript = { { 'prettierd', 'prettier' } },
|
javascript = { 'prettierd', 'prettier' },
|
||||||
typescript = { { 'prettierd', 'prettier' } },
|
typescript = { 'prettierd', 'prettier', stop_after_first = true, lsp_fallback = false },
|
||||||
typescriptreact = { { 'prettierd', 'prettier' } },
|
typescriptreact = { 'prettierd', 'prettier' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -920,11 +922,9 @@ require('lazy').setup({
|
|||||||
-- Here are some example plugins that I've included in the Kickstart repository.
|
-- Here are some example plugins that I've included in the Kickstart repository.
|
||||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||||
--
|
--
|
||||||
require 'kickstart.plugins.debug',
|
|
||||||
require 'kickstart.plugins.indent_line',
|
require 'kickstart.plugins.indent_line',
|
||||||
require 'kickstart.plugins.lint',
|
require 'kickstart.plugins.lint',
|
||||||
require 'kickstart.plugins.autopairs',
|
require 'kickstart.plugins.autopairs',
|
||||||
require 'kickstart.plugins.neo-tree',
|
|
||||||
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||||
|
|
||||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
return {
|
||||||
|
'michaelb/sniprun',
|
||||||
|
branch = 'master',
|
||||||
|
|
||||||
|
build = 'sh install.sh',
|
||||||
|
-- do 'sh install.sh 1' if you want to force compile locally
|
||||||
|
-- (instead of fetching a binary from the github release). Requires Rust >= 1.65
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
require('sniprun').setup {
|
||||||
|
-- your options
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
return {
|
||||||
|
-- 'neovim/nvim-lspconfig', -- REQUIRED: for native Neovim LSP integration
|
||||||
|
-- lazy = false, -- REQUIRED: tell lazy.nvim to start this plugin at startup
|
||||||
|
-- dependencies = {
|
||||||
|
-- -- main one
|
||||||
|
-- { 'ms-jpq/coq_nvim', branch = 'coq' },
|
||||||
|
--
|
||||||
|
-- -- 9000+ Snippets
|
||||||
|
-- { 'ms-jpq/coq.artifacts', branch = 'artifacts' },
|
||||||
|
--
|
||||||
|
-- -- lua & third party sources -- See https://github.com/ms-jpq/coq.thirdparty
|
||||||
|
-- -- Need to **configure separately**
|
||||||
|
-- { 'ms-jpq/coq.thirdparty', branch = '3p' },
|
||||||
|
-- -- - shell repl
|
||||||
|
-- -- - nvim lua api
|
||||||
|
-- -- - scientific calculator
|
||||||
|
-- -- - comment banner
|
||||||
|
-- -- - etc
|
||||||
|
-- },
|
||||||
|
-- init = function()
|
||||||
|
-- vim.g.coq_settings = {
|
||||||
|
-- auto_start = true, -- if you want to start COQ at startup
|
||||||
|
-- -- Your COQ settings here
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
-- config = function()
|
||||||
|
-- -- See `:help cmp`
|
||||||
|
-- local cmp = require 'coq'
|
||||||
|
-- local luasnip = require 'luasnip'
|
||||||
|
-- luasnip.config.setup {}
|
||||||
|
--
|
||||||
|
-- cmp.setup {
|
||||||
|
-- snippet = {
|
||||||
|
-- expand = function(args)
|
||||||
|
-- luasnip.lsp_expand(args.body)
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
-- completion = { completeopt = 'menu,menuone,noinsert' },
|
||||||
|
--
|
||||||
|
-- -- For an understanding of why these mappings were
|
||||||
|
-- -- chosen, you will need to read `:help ins-completion`
|
||||||
|
-- --
|
||||||
|
-- -- No, but seriously. Please read `:help ins-completion`, it is really good!
|
||||||
|
-- mapping = cmp.mapping.preset.insert {
|
||||||
|
-- -- Select the [n]ext item
|
||||||
|
-- ['<C-n>'] = cmp.mapping.select_next_item(),
|
||||||
|
-- -- Select the [p]revious item
|
||||||
|
-- ['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||||
|
--
|
||||||
|
-- -- Scroll the documentation window [b]ack / [f]orward
|
||||||
|
-- ['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
-- ['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
--
|
||||||
|
-- -- Accept ([y]es) the completion.
|
||||||
|
-- -- This will auto-import if your LSP supports it.
|
||||||
|
-- -- This will expand snippets if the LSP sent a snippet.
|
||||||
|
-- ['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||||
|
--
|
||||||
|
-- -- If you prefer more traditional completion keymaps,
|
||||||
|
-- -- you can uncomment the following lines
|
||||||
|
-- --['<CR>'] = cmp.mapping.confirm { select = true },
|
||||||
|
-- --['<Tab>'] = cmp.mapping.select_next_item(),
|
||||||
|
-- --['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||||
|
--
|
||||||
|
-- -- Manually trigger a completion from nvim-cmp.
|
||||||
|
-- -- Generally you don't need this, because nvim-cmp will display
|
||||||
|
-- -- completions whenever it has completion options available.
|
||||||
|
-- ['<C-Space>'] = cmp.mapping.complete {},
|
||||||
|
--
|
||||||
|
-- -- Think of <c-l> as moving to the right of your snippet expansion.
|
||||||
|
-- -- So if you have a snippet that's like:
|
||||||
|
-- -- function $name($args)
|
||||||
|
-- -- $body
|
||||||
|
-- -- end
|
||||||
|
-- --
|
||||||
|
-- -- <c-l> will move you to the right of each of the expansion locations.
|
||||||
|
-- -- <c-h> is similar, except moving you backwards.
|
||||||
|
-- ['<C-l>'] = cmp.mapping(function()
|
||||||
|
-- if luasnip.expand_or_locally_jumpable() then
|
||||||
|
-- luasnip.expand_or_jump()
|
||||||
|
-- end
|
||||||
|
-- end, { 'i', 's' }),
|
||||||
|
-- ['<C-h>'] = cmp.mapping(function()
|
||||||
|
-- if luasnip.locally_jumpable(-1) then
|
||||||
|
-- luasnip.jump(-1)
|
||||||
|
-- end
|
||||||
|
-- end, { 'i', 's' }),
|
||||||
|
--
|
||||||
|
-- -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
||||||
|
-- -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
||||||
|
-- },
|
||||||
|
-- sources = {
|
||||||
|
-- { name = 'nvim_lsp' },
|
||||||
|
-- { name = 'luasnip' },
|
||||||
|
-- { name = 'path' },
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
-- end,
|
||||||
|
}
|
||||||
@@ -4,25 +4,7 @@
|
|||||||
-- See the kickstart.nvim README for more information
|
-- See the kickstart.nvim README for more information
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
'iamcco/markdown-preview.nvim',
|
'OXY2DEV/markview.nvim',
|
||||||
cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' },
|
lazy = false,
|
||||||
build = 'cd app && yarn install',
|
|
||||||
init = function()
|
|
||||||
vim.g.mkdp_filetypes = { 'markdown' }
|
|
||||||
end,
|
|
||||||
ft = { 'markdown' },
|
|
||||||
},
|
},
|
||||||
{
|
|
||||||
'navarasu/onedark.nvim',
|
|
||||||
opts = {
|
|
||||||
style = 'warm',
|
|
||||||
transparent = true,
|
|
||||||
term_colors = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
|
|
||||||
'folke/tokyonight.nvim',
|
|
||||||
},
|
|
||||||
{ 'catppuccin/nvim', name = 'catppuccin', priority = 1000 },
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
'danymat/neogen',
|
||||||
|
config = true,
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
'startup-nvim/startup.nvim',
|
||||||
|
dependencies = { 'nvim-telescope/telescope.nvim', 'nvim-lua/plenary.nvim', 'nvim-telescope/telescope-file-browser.nvim' },
|
||||||
|
config = function()
|
||||||
|
require('startup').setup { theme = 'evil' }
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -10,4 +10,5 @@ return {
|
|||||||
'pmizio/typescript-tools.nvim',
|
'pmizio/typescript-tools.nvim',
|
||||||
dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' },
|
dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' },
|
||||||
opts = opts,
|
opts = opts,
|
||||||
|
lazy = true,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,96 +0,0 @@
|
|||||||
-- debug.lua
|
|
||||||
--
|
|
||||||
-- Shows how to use the DAP plugin to debug your code.
|
|
||||||
--
|
|
||||||
-- Primarily focused on configuring the debugger for Go, but can
|
|
||||||
-- be extended to other languages as well. That's why it's called
|
|
||||||
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
|
||||||
|
|
||||||
return {
|
|
||||||
-- NOTE: Yes, you can install new plugins here!
|
|
||||||
'mfussenegger/nvim-dap',
|
|
||||||
-- NOTE: And you can specify dependencies as well
|
|
||||||
dependencies = {
|
|
||||||
-- Creates a beautiful debugger UI
|
|
||||||
'rcarriga/nvim-dap-ui',
|
|
||||||
|
|
||||||
-- Required dependency for nvim-dap-ui
|
|
||||||
'nvim-neotest/nvim-nio',
|
|
||||||
|
|
||||||
-- Installs the debug adapters for you
|
|
||||||
'williamboman/mason.nvim',
|
|
||||||
'jay-babu/mason-nvim-dap.nvim',
|
|
||||||
|
|
||||||
-- Add your own debuggers here
|
|
||||||
'leoluz/nvim-dap-go',
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local dap = require 'dap'
|
|
||||||
local dapui = require 'dapui'
|
|
||||||
|
|
||||||
require('mason-nvim-dap').setup {
|
|
||||||
-- Makes a best effort to setup the various debuggers with
|
|
||||||
-- reasonable debug configurations
|
|
||||||
automatic_installation = true,
|
|
||||||
|
|
||||||
-- You can provide additional configuration to the handlers,
|
|
||||||
-- see mason-nvim-dap README for more information
|
|
||||||
handlers = {},
|
|
||||||
|
|
||||||
-- You'll need to check that you have the required things installed
|
|
||||||
-- online, please don't ask me how to install them :)
|
|
||||||
ensure_installed = {
|
|
||||||
-- Update this to ensure that you have the debuggers for the langs you want
|
|
||||||
'delve',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- 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
|
|
||||||
-- For more information, see |:help nvim-dap-ui|
|
|
||||||
dapui.setup {
|
|
||||||
-- Set icons to characters that are more likely to work in every terminal.
|
|
||||||
-- Feel free to remove or use ones that you like more! :)
|
|
||||||
-- Don't feel like these are good choices.
|
|
||||||
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.' })
|
|
||||||
|
|
||||||
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 {
|
|
||||||
delve = {
|
|
||||||
-- On Windows delve must be run attached or it crashes.
|
|
||||||
-- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
|
|
||||||
detached = vim.fn.has 'win32' == 0,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
-- Neo-tree is a Neovim plugin to browse the file system
|
|
||||||
-- https://github.com/nvim-neo-tree/neo-tree.nvim
|
|
||||||
|
|
||||||
return {
|
|
||||||
'nvim-neo-tree/neo-tree.nvim',
|
|
||||||
version = '*',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-lua/plenary.nvim',
|
|
||||||
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
|
||||||
'MunifTanjim/nui.nvim',
|
|
||||||
},
|
|
||||||
cmd = 'Neotree',
|
|
||||||
keys = {
|
|
||||||
{ '\\', ':Neotree reveal<CR>', { desc = 'NeoTree reveal' } },
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
filesystem = {
|
|
||||||
window = {
|
|
||||||
position = 'right',
|
|
||||||
mappings = {
|
|
||||||
['\\'] = 'close_window',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user