Merge 48c85c077c
into 3338d39206
This commit is contained in:
commit
0aa64b6bb3
157
init.lua
157
init.lua
|
@ -84,14 +84,17 @@ I hope you enjoy your Neovim journey,
|
||||||
P.S. You can delete this when you're done too. It's your config now! :)
|
P.S. You can delete this when you're done too. It's your config now! :)
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
|
-- Custom config.
|
||||||
|
require 'custom.keybindings'
|
||||||
|
|
||||||
-- Set <space> as the leader key
|
-- Set <space> as the leader key
|
||||||
-- See `:help mapleader`
|
-- See `:help mapleader`
|
||||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ';'
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ';'
|
||||||
|
|
||||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||||
vim.g.have_nerd_font = false
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.o`
|
-- See `:help vim.o`
|
||||||
|
@ -110,6 +113,9 @@ vim.o.mouse = 'a'
|
||||||
-- Don't show the mode, since it's already in the status line
|
-- Don't show the mode, since it's already in the status line
|
||||||
vim.o.showmode = false
|
vim.o.showmode = false
|
||||||
|
|
||||||
|
-- Disable swapfiles
|
||||||
|
vim.opt.swapfile = false -- Disable .swp files
|
||||||
|
|
||||||
-- Sync clipboard between OS and Neovim.
|
-- Sync clipboard between OS and Neovim.
|
||||||
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
||||||
-- Remove this option if you want your OS clipboard to remain independent.
|
-- Remove this option if you want your OS clipboard to remain independent.
|
||||||
|
@ -200,10 +206,10 @@ vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower win
|
||||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||||
|
|
||||||
-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
|
-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
|
||||||
-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
|
vim.keymap.set('n', '<C-S-h>', '<C-w>H', { desc = 'Move window to the left' })
|
||||||
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
|
vim.keymap.set('n', '<C-S-l>', '<C-w>L', { desc = 'Move window to the right' })
|
||||||
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
|
vim.keymap.set('n', '<C-S-j>', '<C-w>J', { desc = 'Move window to the lower' })
|
||||||
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
|
vim.keymap.set('n', '<C-S-k>', '<C-w>K', { desc = 'Move window to the upper' })
|
||||||
|
|
||||||
-- [[ Basic Autocommands ]]
|
-- [[ Basic Autocommands ]]
|
||||||
-- See `:help lua-guide-autocommands`
|
-- See `:help lua-guide-autocommands`
|
||||||
|
@ -672,9 +678,9 @@ require('lazy').setup({
|
||||||
-- 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 = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
gopls = {},
|
||||||
-- pyright = {},
|
-- pyright = {},
|
||||||
-- rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
--
|
--
|
||||||
-- Some languages (like typescript) have entire language plugins that can be useful:
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||||
|
@ -683,7 +689,46 @@ require('lazy').setup({
|
||||||
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
||||||
-- ts_ls = {},
|
-- ts_ls = {},
|
||||||
--
|
--
|
||||||
|
-- Vue 3
|
||||||
|
--
|
||||||
|
vuels = {
|
||||||
|
filetypes = { 'vue', 'javascript', 'typescript' },
|
||||||
|
init_options = {
|
||||||
|
config = {
|
||||||
|
vetur = { -- For Vue 2 compatibility (optional)
|
||||||
|
validation = { template = true, script = true, style = true },
|
||||||
|
format = { enable = false }, -- Disable if using Prettier
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- TypeScript
|
||||||
|
ts_ls = {
|
||||||
|
init_options = {
|
||||||
|
plugins = {
|
||||||
|
{
|
||||||
|
name = '@vue/typescript-plugin',
|
||||||
|
location = vim.fn.stdpath 'data' .. '/mason/packages/vue-language-server/node_modules/@vue/language-server',
|
||||||
|
languages = { 'vue' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
settings = {
|
||||||
|
typescript = {
|
||||||
|
inlayHints = {
|
||||||
|
includeInlayParameterNameHints = 'all',
|
||||||
|
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
|
||||||
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
|
includeInlayVariableTypeHints = true,
|
||||||
|
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
|
||||||
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
|
includeInlayFunctionLikeReturnTypeHints = true,
|
||||||
|
includeInlayEnumMemberValueHints = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
||||||
|
},
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
-- cmd = { ... },
|
-- cmd = { ... },
|
||||||
-- filetypes = { ... },
|
-- filetypes = { ... },
|
||||||
|
@ -698,6 +743,13 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- python lsp
|
||||||
|
pyright = {},
|
||||||
|
-- CSS/SCSS LSP
|
||||||
|
cssls = {
|
||||||
|
filetypes = { 'css', 'scss', 'sass' },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Ensure the servers and tools above are installed
|
-- Ensure the servers and tools above are installed
|
||||||
|
@ -717,10 +769,16 @@ require('lazy').setup({
|
||||||
vim.list_extend(ensure_installed, {
|
vim.list_extend(ensure_installed, {
|
||||||
'stylua', -- Used to format Lua code
|
'stylua', -- Used to format Lua code
|
||||||
})
|
})
|
||||||
|
vim.filetype.add {
|
||||||
|
extension = {
|
||||||
|
vue = 'vue',
|
||||||
|
},
|
||||||
|
}
|
||||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
||||||
require('mason-lspconfig').setup {
|
require('mason-lspconfig').setup {
|
||||||
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
|
ensure_installed = { 'vuels', 'lua_ls' }, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
|
||||||
|
automatic_enable = true,
|
||||||
automatic_installation = false,
|
automatic_installation = false,
|
||||||
handlers = {
|
handlers = {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
|
@ -772,7 +830,7 @@ require('lazy').setup({
|
||||||
-- python = { "isort", "black" },
|
-- python = { "isort", "black" },
|
||||||
--
|
--
|
||||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
-- javascript = { 'prettierd', 'prettier', stop_after_first = true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -809,6 +867,8 @@ require('lazy').setup({
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
'folke/lazydev.nvim',
|
'folke/lazydev.nvim',
|
||||||
|
-- custom deps
|
||||||
|
'Kaiser-Yang/blink-cmp-avante',
|
||||||
},
|
},
|
||||||
--- @module 'blink.cmp'
|
--- @module 'blink.cmp'
|
||||||
--- @type blink.cmp.Config
|
--- @type blink.cmp.Config
|
||||||
|
@ -837,6 +897,19 @@ require('lazy').setup({
|
||||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||||
preset = 'default',
|
preset = 'default',
|
||||||
|
|
||||||
|
['<Tab>'] = {
|
||||||
|
function(cmp)
|
||||||
|
if cmp.snippet_active() then
|
||||||
|
return cmp.accept()
|
||||||
|
else
|
||||||
|
return cmp.select_and_accept()
|
||||||
|
end
|
||||||
|
vim.api.nvim_command '<Esc>'
|
||||||
|
end,
|
||||||
|
'snippet_forward',
|
||||||
|
'fallback',
|
||||||
|
},
|
||||||
|
|
||||||
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
||||||
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
||||||
},
|
},
|
||||||
|
@ -851,12 +924,22 @@ require('lazy').setup({
|
||||||
-- By default, you may press `<c-space>` to show the documentation.
|
-- By default, you may press `<c-space>` to show the documentation.
|
||||||
-- Optionally, set `auto_show = true` to show the documentation after a delay.
|
-- Optionally, set `auto_show = true` to show the documentation after a delay.
|
||||||
documentation = { auto_show = false, auto_show_delay_ms = 500 },
|
documentation = { auto_show = false, auto_show_delay_ms = 500 },
|
||||||
|
ghost_text = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
sources = {
|
sources = {
|
||||||
default = { 'lsp', 'path', 'snippets', 'lazydev' },
|
default = { 'lsp', 'path', 'snippets', 'lazydev', 'avante' },
|
||||||
providers = {
|
providers = {
|
||||||
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
|
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
|
||||||
|
avante = {
|
||||||
|
module = 'blink-cmp-avante',
|
||||||
|
name = 'Avante',
|
||||||
|
opts = {
|
||||||
|
-- options for blink-cmp-avante
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -917,7 +1000,19 @@ require('lazy').setup({
|
||||||
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||||
-- - sd' - [S]urround [D]elete [']quotes
|
-- - sd' - [S]urround [D]elete [']quotes
|
||||||
-- - sr)' - [S]urround [R]eplace [)] [']
|
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||||
require('mini.surround').setup()
|
require('mini.surround').setup {
|
||||||
|
custom_surroundings = {
|
||||||
|
[')'] = { output = { left = '( ', right = ' )' } },
|
||||||
|
['('] = { output = { left = '(', right = ')' } },
|
||||||
|
['{'] = { output = { left = '{\n', right = '\n}' } },
|
||||||
|
['['] = { output = { left = '[', right = ']' } },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- // custom mini plugins
|
||||||
|
--
|
||||||
|
require('mini.starter').setup()
|
||||||
|
-- require('mini.bufremove').setup()
|
||||||
|
|
||||||
-- Simple and easy statusline.
|
-- Simple and easy statusline.
|
||||||
-- You could remove this setup call if you don't like it,
|
-- You could remove this setup call if you don't like it,
|
||||||
|
@ -944,7 +1039,24 @@ require('lazy').setup({
|
||||||
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
||||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
|
ensure_installed = {
|
||||||
|
'bash',
|
||||||
|
'c',
|
||||||
|
'diff',
|
||||||
|
'html',
|
||||||
|
'lua',
|
||||||
|
'luadoc',
|
||||||
|
'markdown',
|
||||||
|
'markdown_inline',
|
||||||
|
'query',
|
||||||
|
'vim',
|
||||||
|
'vimdoc',
|
||||||
|
'html',
|
||||||
|
'javascript',
|
||||||
|
'typescript',
|
||||||
|
'tsx',
|
||||||
|
'vue',
|
||||||
|
},
|
||||||
-- Autoinstall languages that are not installed
|
-- Autoinstall languages that are not installed
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
|
@ -955,6 +1067,9 @@ require('lazy').setup({
|
||||||
additional_vim_regex_highlighting = { 'ruby' },
|
additional_vim_regex_highlighting = { 'ruby' },
|
||||||
},
|
},
|
||||||
indent = { enable = true, disable = { 'ruby' } },
|
indent = { enable = true, disable = { 'ruby' } },
|
||||||
|
autotag = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
-- There are additional nvim-treesitter modules that you can use to interact
|
-- There are additional nvim-treesitter modules that you can use to interact
|
||||||
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
||||||
|
@ -974,17 +1089,17 @@ require('lazy').setup({
|
||||||
-- 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.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.neo-tree',
|
||||||
-- require 'kickstart.plugins.neo-tree',
|
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
require 'kickstart.plugins.nvim-ts-autotag', -- adds nvim-ts-autotag
|
||||||
|
|
||||||
-- 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`
|
||||||
-- This is the easiest way to modularize your config.
|
-- This is the easiest way to modularize your config.
|
||||||
--
|
--
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||||
-- { import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
--
|
--
|
||||||
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
||||||
-- Or use telescope!
|
-- Or use telescope!
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
-- Custom Keybinds.
|
||||||
|
|
||||||
|
vim.keymap.set('i', 'jk', '<Esc>', { desc = 'escape' })
|
||||||
|
vim.keymap.set('i', 'kj', '<Esc>', { desc = 'escape' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', ',,', '<Cmd>ToggleTerm<CR>', { desc = 'Open terminal in horizontal split' })
|
||||||
|
vim.keymap.set('t', ',,', '<Cmd>ToggleTerm<CR>', { desc = 'Open terminal in horizontal split' })
|
||||||
|
|
||||||
|
-- vim.keymap.set('n', '<C-q>', '<Cmd>bdelete<CR>')
|
||||||
|
|
||||||
|
-- Change buffer by number (example Alt+1, Alt+2...)
|
||||||
|
for i = 1, 9 do
|
||||||
|
vim.keymap.set('n', '<M-' .. i .. '>', '<Cmd>BufferLineGoToBuffer ' .. i .. '<CR>')
|
||||||
|
end
|
|
@ -1,5 +1,122 @@
|
||||||
-- You can add your own plugins here or in other files in this directory!
|
|
||||||
-- I promise not to create any merge conflicts in this directory :)
|
|
||||||
--
|
--
|
||||||
-- See the kickstart.nvim README for more information
|
-- See the kickstart.nvim README for more information
|
||||||
return {}
|
return {
|
||||||
|
{
|
||||||
|
'akinsho/bufferline.nvim',
|
||||||
|
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||||
|
|
||||||
|
event = 'VeryLazy',
|
||||||
|
keys = {
|
||||||
|
{ '<S-h>', '<cmd>BufferLineCyclePrev<cr>', desc = 'Prev Buffer' },
|
||||||
|
{ '<S-l>', '<cmd>BufferLineCycleNext<cr>', desc = 'Next Buffer' },
|
||||||
|
{ '<S-C-j>', '<cmd>BufferLineMovePrev<cr>', desc = 'Move buffer prev' },
|
||||||
|
{ '<S-C-k>', '<cmd>BufferLineMoveNext<cr>', desc = 'Move buffer next' },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
diagnostics = 'nvim_lsp',
|
||||||
|
always_show_bufferline = true,
|
||||||
|
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||||
|
local icon = level:match 'error' and ' ' or ' '
|
||||||
|
return ' ' .. icon .. count
|
||||||
|
end,
|
||||||
|
offsets = {
|
||||||
|
{
|
||||||
|
filetype = 'neo-tree',
|
||||||
|
text = 'Neo-tree',
|
||||||
|
highlight = 'Directory',
|
||||||
|
text_align = 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filetype = 'snacks_layout_box',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
show_buffer_icons = true,
|
||||||
|
color_icons = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'mattn/emmet-vim',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'yetone/avante.nvim',
|
||||||
|
event = 'VeryLazy',
|
||||||
|
version = false, -- Never set this value to "*"! Never!
|
||||||
|
opts = {
|
||||||
|
provider = 'deepseek',
|
||||||
|
providers = {
|
||||||
|
deepseek = {
|
||||||
|
__inherited_from = 'openai',
|
||||||
|
api_key_name = 'DEEPSEEK_API_KEY',
|
||||||
|
endpoint = 'https://api.deepseek.com',
|
||||||
|
model = 'deepseek-coder',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
|
||||||
|
build = 'make',
|
||||||
|
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
|
||||||
|
dependencies = {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
'stevearc/dressing.nvim',
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
'MunifTanjim/nui.nvim',
|
||||||
|
--- The below dependencies are optional,
|
||||||
|
'echasnovski/mini.pick', -- for file_selector provider mini.pick
|
||||||
|
'nvim-telescope/telescope.nvim', -- for file_selector provider telescope
|
||||||
|
'hrsh7th/nvim-cmp', -- autocompletion for avante commands and mentions
|
||||||
|
-- 'ibhagwan/fzf-lua', -- for file_selector provider fzf
|
||||||
|
-- 'nvim-tree/nvim-web-devicons', -- or echasnovski/mini.icons
|
||||||
|
'echasnovski/mini.icons', -- or echasnovski/mini.icons
|
||||||
|
-- 'zbirenbaum/copilot.lua', -- for providers='copilot'
|
||||||
|
-- {
|
||||||
|
-- -- support for image pasting
|
||||||
|
-- 'HakonHarnes/img-clip.nvim',
|
||||||
|
-- event = 'VeryLazy',
|
||||||
|
-- opts = {
|
||||||
|
-- -- recommended settings
|
||||||
|
-- default = {
|
||||||
|
-- embed_image_as_base64 = false,
|
||||||
|
-- prompt_for_file_name = false,
|
||||||
|
-- drag_and_drop = {
|
||||||
|
-- insert_mode = true,
|
||||||
|
-- },
|
||||||
|
-- -- required for Windows users
|
||||||
|
-- use_absolute_path = true,
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
{
|
||||||
|
-- Make sure to set this up properly if you have lazy=true
|
||||||
|
'MeanderingProgrammer/render-markdown.nvim',
|
||||||
|
opts = {
|
||||||
|
file_types = { 'markdown', 'Avante' },
|
||||||
|
},
|
||||||
|
ft = { 'markdown', 'Avante' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ 'akinsho/toggleterm.nvim', version = '*', opts = {} },
|
||||||
|
{
|
||||||
|
'antosha417/nvim-lsp-file-operations',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
-- Uncomment whichever supported plugin(s) you use
|
||||||
|
-- "nvim-tree/nvim-tree.lua",
|
||||||
|
'nvim-neo-tree/neo-tree.nvim',
|
||||||
|
-- "simonmclean/triptych.nvim"
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('lsp-file-operations').setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
dependencies = {
|
||||||
|
-- Add nvim-ts-autotag
|
||||||
|
{ 'windwp/nvim-ts-autotag' },
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
-- autopairs
|
|
||||||
-- https://github.com/windwp/nvim-autopairs
|
|
||||||
|
|
||||||
return {
|
|
||||||
'windwp/nvim-autopairs',
|
|
||||||
event = 'InsertEnter',
|
|
||||||
opts = {},
|
|
||||||
}
|
|
|
@ -11,13 +11,44 @@ return {
|
||||||
},
|
},
|
||||||
lazy = false,
|
lazy = false,
|
||||||
keys = {
|
keys = {
|
||||||
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
|
{ '<leader>e', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
filesystem = {
|
filesystem = {
|
||||||
|
bind_to_cwd = true,
|
||||||
|
commands = {
|
||||||
|
avante_add_files = function(state)
|
||||||
|
local node = state.tree:get_node()
|
||||||
|
local filepath = node:get_id()
|
||||||
|
local relative_path = require('avante.utils').relative_path(filepath)
|
||||||
|
|
||||||
|
local sidebar = require('avante').get()
|
||||||
|
|
||||||
|
local open = sidebar:is_open()
|
||||||
|
-- ensure avante sidebar is open
|
||||||
|
if not open then
|
||||||
|
require('avante.api').ask()
|
||||||
|
sidebar = require('avante').get()
|
||||||
|
end
|
||||||
|
|
||||||
|
sidebar.file_selector:add_selected_file(relative_path)
|
||||||
|
|
||||||
|
-- remove neo tree buffer
|
||||||
|
if not open then
|
||||||
|
sidebar.file_selector:remove_selected_file 'neo-tree filesystem [1]'
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
window = {
|
window = {
|
||||||
mappings = {
|
mappings = {
|
||||||
['\\'] = 'close_window',
|
['<leader>e'] = 'close_window',
|
||||||
|
['<C-cr>'] = {
|
||||||
|
'open',
|
||||||
|
config = {
|
||||||
|
open_command = 'tabnew',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
['oa'] = 'avante_add_files',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
return {
|
||||||
|
'windwp/nvim-ts-autotag',
|
||||||
|
event = 'InsertEnter',
|
||||||
|
opts = {},
|
||||||
|
}
|
Loading…
Reference in New Issue