Update neovim config to use lazyvim
This commit is contained in:
@@ -1504,7 +1504,7 @@ wayland_titlebar_color #222436
|
|||||||
#: configuration will change this value only for newly created OS
|
#: configuration will change this value only for newly created OS
|
||||||
#: windows.
|
#: windows.
|
||||||
|
|
||||||
linux_display_server x11
|
# linux_display_server x11
|
||||||
|
|
||||||
#: Choose between Wayland and X11 backends. By default, an appropriate
|
#: Choose between Wayland and X11 backends. By default, an appropriate
|
||||||
#: backend based on the system state is chosen automatically. Set it
|
#: backend based on the system state is chosen automatically. Set it
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
tt.*
|
||||||
|
.tests
|
||||||
|
doc/tags
|
||||||
|
debug
|
||||||
|
.repro
|
||||||
|
foo.*
|
||||||
|
*.log
|
||||||
|
data
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"runtime.version": "LuaJIT",
|
|
||||||
"runtime.path": [
|
|
||||||
"lua/?.lua",
|
|
||||||
"lua/?/init.lua"
|
|
||||||
],
|
|
||||||
"diagnostics.globals": ["vim"],
|
|
||||||
"workspace.checkThirdParty": false,
|
|
||||||
"workspace.library": [ "$VIMRUNTIME" ],
|
|
||||||
"workspace.maxPreload": 100000,
|
|
||||||
"workspace.preloadFileSize": 10000,
|
|
||||||
"telemetry.enable": false
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"neodev": {
|
||||||
|
"library": {
|
||||||
|
"enabled": true,
|
||||||
|
"plugins": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"neoconf": {
|
||||||
|
"plugins": {
|
||||||
|
"lua_ls": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
# 💤 LazyVim
|
||||||
|
|
||||||
|
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
|
||||||
|
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.
|
||||||
@@ -1 +1 @@
|
|||||||
require'config'
|
require("config.lazy")
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"extras": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"install_version": 8,
|
||||||
|
"news": {
|
||||||
|
"NEWS.md": "11866"
|
||||||
|
},
|
||||||
|
"version": 8
|
||||||
|
}
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
local augroup = vim.api.nvim_create_augroup
|
|
||||||
local gib_group = augroup('Gib', {})
|
|
||||||
local autocmd = vim.api.nvim_create_autocmd
|
|
||||||
local yank_group = augroup('HighlightYank', {})
|
|
||||||
|
|
||||||
function R(name)
|
|
||||||
require("plenary.reload").reload_module(name)
|
|
||||||
end
|
|
||||||
|
|
||||||
autocmd('TextYankPost', {
|
|
||||||
group = yank_group,
|
|
||||||
pattern = '*',
|
|
||||||
callback = function()
|
|
||||||
vim.highlight.on_yank({
|
|
||||||
higroup = 'IncSearch',
|
|
||||||
timeout = 40,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
autocmd({"BufWritePre"}, {
|
|
||||||
group = gib_group,
|
|
||||||
pattern = "*",
|
|
||||||
command = [[%s/\s\+$//e]],
|
|
||||||
})
|
|
||||||
|
|
||||||
autocmd({'BufWritePost'}, {
|
|
||||||
pattern = 'init.lua',
|
|
||||||
command = 'source <afile>',
|
|
||||||
})
|
|
||||||
|
|
||||||
autocmd('FileType', {
|
|
||||||
group = gib_group,
|
|
||||||
pattern = 'markdown',
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.tabstop = 2
|
|
||||||
vim.opt_local.softtabstop = 2
|
|
||||||
vim.opt_local.shiftwidth = 2
|
|
||||||
vim.opt_local.expandtab = true
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
autocmd('LspAttach', {
|
|
||||||
group = gib_group,
|
|
||||||
callback = function(e)
|
|
||||||
local opts = { buffer = e.buf }
|
|
||||||
vim.keymap.set('n', '<leader>kf', function() vim.lsp.buf.format() end, opts)
|
|
||||||
vim.keymap.set("n", "<leader>gd", function() vim.lsp.buf.definition() end, opts)
|
|
||||||
vim.keymap.set("n", "<leader>kw", function() vim.lsp.buf.workspace_symbol() end, opts)
|
|
||||||
vim.keymap.set("n", "<leader>kd", function() vim.diagnostic.open_float() end, opts)
|
|
||||||
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
|
||||||
vim.keymap.set("n", "<leader>re", function() vim.lsp.buf.references() end, opts)
|
|
||||||
vim.keymap.set("n", "<leader>rn", function() vim.lsp.buf.rename() end, opts)
|
|
||||||
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
|
||||||
end
|
|
||||||
})
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
-- Autocmds are automatically loaded on the VeryLazy event
|
||||||
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||||
|
|
||||||
|
-- Strip trailing whitespace on save
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
|
pattern = "*",
|
||||||
|
callback = function()
|
||||||
|
local view = vim.fn.winsaveview()
|
||||||
|
vim.cmd([[keeppatterns %s/\s\+$//e]])
|
||||||
|
vim.fn.winrestview(view)
|
||||||
|
end,
|
||||||
|
})
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
require'config.options'
|
|
||||||
require'config.keymaps'
|
|
||||||
require'config.lazy'
|
|
||||||
require'config.autocmd'
|
|
||||||
@@ -1,41 +1,66 @@
|
|||||||
vim.g.mapleader = ' '
|
-- Keymaps are automatically loaded on the VeryLazy event
|
||||||
vim.g.maplocalleader = "\\"
|
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||||
vim.keymap.set('n', '<leader><leader>s', ':update<CR> :source<CR>')
|
|
||||||
vim.keymap.set('n', '<leader><leader>x', ':!chmod +x %<CR>', { silent = true })
|
-- Remove LazyVim's C-h/j/k/l window navigation (using <leader>h/j/k/l instead)
|
||||||
vim.keymap.set({'n', 'v', 'x'}, '<leader>h', '<C-w>h')
|
pcall(vim.keymap.del, "n", "<C-h>")
|
||||||
vim.keymap.set({'n', 'v', 'x'}, '<leader>j', '<C-w>j')
|
pcall(vim.keymap.del, "n", "<C-j>")
|
||||||
vim.keymap.set({'n', 'v', 'x'}, '<leader>k', '<C-w>k')
|
pcall(vim.keymap.del, "n", "<C-k>")
|
||||||
vim.keymap.set({'n', 'v', 'x'}, '<leader>l', '<C-w>l')
|
pcall(vim.keymap.del, "n", "<C-l>")
|
||||||
vim.keymap.set('n', '<leader>w', ':write<CR>')
|
pcall(vim.keymap.del, "t", "<C-h>")
|
||||||
vim.keymap.set('n', '<leader>q', ':quit<CR>')
|
pcall(vim.keymap.del, "t", "<C-j>")
|
||||||
-- Move the selected lines up or down one line and reselect
|
pcall(vim.keymap.del, "t", "<C-k>")
|
||||||
vim.keymap.set('v', 'J', ':m \'>+1<CR>gv=gv')
|
pcall(vim.keymap.del, "t", "<C-l>")
|
||||||
vim.keymap.set('v', 'K', ':m \'<-2<CR>gv=gv')
|
-- Remove LazyVim's :Lazy shortcut — <leader>l is used for window navigation
|
||||||
-- Join the current line with the line below and reposition the cursor
|
pcall(vim.keymap.del, "n", "<leader>l")
|
||||||
vim.keymap.set('n', 'J', 'mzJ`z')
|
|
||||||
-- Scroll down or up and reposition the cursor
|
-- Window navigation
|
||||||
vim.keymap.set('n', '<C-d>', '<C-d>zz')
|
vim.keymap.set({ "n", "v", "x" }, "<leader>h", "<C-w>h", { desc = "Go to left window", silent = true })
|
||||||
vim.keymap.set('n', '<C-u>', '<C-u>zz')
|
vim.keymap.set({ "n", "v", "x" }, "<leader>j", "<C-w>j", { desc = "Go to lower window", silent = true })
|
||||||
-- Search forward and reposition the cursor
|
vim.keymap.set({ "n", "v", "x" }, "<leader>k", "<C-w>k", { desc = "Go to upper window", silent = true })
|
||||||
vim.keymap.set('n', 'n', 'nzzzv')
|
vim.keymap.set({ "n", "v", "x" }, "<leader>l", "<C-w>l", { desc = "Go to right window", silent = true })
|
||||||
-- Search backward and reposition the cursor
|
|
||||||
vim.keymap.set('n', 'N', 'Nzzzv')
|
-- Buffer tab navigation
|
||||||
-- Paste the selection from the system clipboard
|
vim.keymap.set("n", "<C-h>", "<cmd>BufferLineCyclePrev<cr>", { desc = "Previous buffer", silent = true })
|
||||||
vim.keymap.set({'n', 'v', 'x'}, '<leader>p', [["+p]])
|
vim.keymap.set("n", "<C-l>", "<cmd>BufferLineCycleNext<cr>", { desc = "Next buffer", silent = true })
|
||||||
vim.keymap.set({'n', 'v', 'x'}, '<leader>P', [["+P]])
|
vim.keymap.set("n", "<C-j>", "<cmd>BufferLineMovePrev<cr>", { desc = "Move buffer left", silent = true })
|
||||||
-- Move selected text to the black hole register & replace with copied text.
|
vim.keymap.set("n", "<C-k>", "<cmd>BufferLineMoveNext<cr>", { desc = "Move buffer right", silent = true })
|
||||||
vim.keymap.set('x', '<leader>v', [["_dP]])
|
vim.keymap.set("n", "<C-q>", function() Snacks.bufdelete() end, { desc = "Close buffer", silent = true })
|
||||||
-- Yank (copy) the selection to the system clipboard
|
vim.keymap.set("n", "<C-a>", function() Snacks.bufdelete.other() end, { desc = "Close other buffers", silent = true })
|
||||||
vim.keymap.set({'n', 'v'}, '<leader>y', [["+y]])
|
|
||||||
-- Yank (copy) the entire buffer to the system clipboard
|
-- Disable ex mode
|
||||||
vim.keymap.set('n', '<leader>yy', [["+Y]])
|
vim.keymap.set("n", "Q", "<nop>")
|
||||||
-- Yank all the text in the file to the system clipboard
|
|
||||||
vim.keymap.set('n', '<leader>YY', ':%y+<CR>')
|
-- Move selected lines up/down
|
||||||
-- Delete the selection without yanking (copying) it
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", { desc = "Move selection down", silent = true })
|
||||||
vim.keymap.set({'n', 'v'}, '<leader>d', [["_d]])
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", { desc = "Move selection up", silent = true })
|
||||||
-- Delete the line without yanking (copying) it
|
|
||||||
vim.keymap.set('n', '<leader>dd', [["_dd]])
|
-- Join line without moving cursor
|
||||||
-- Map Q in Normal mode to do nothing (nop)
|
vim.keymap.set("n", "J", "mzJ`z", { desc = "Join line, keep cursor" })
|
||||||
vim.keymap.set('n', 'Q', '<nop>')
|
|
||||||
-- Perform a search and replace operation using the word under the cursor
|
-- Scroll and center
|
||||||
vim.keymap.set('n', '<leader>sr', [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
|
vim.keymap.set("n", "<C-d>", "<C-d>zz", { desc = "Scroll down and center" })
|
||||||
|
vim.keymap.set("n", "<C-u>", "<C-u>zz", { desc = "Scroll up and center" })
|
||||||
|
|
||||||
|
-- Search and center
|
||||||
|
vim.keymap.set("n", "n", "nzzzv", { desc = "Next search result" })
|
||||||
|
vim.keymap.set("n", "N", "Nzzzv", { desc = "Prev search result" })
|
||||||
|
|
||||||
|
-- Yank to system clipboard
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>y", '"+y', { desc = "Yank to clipboard" })
|
||||||
|
vim.keymap.set("n", "<leader>Y", '"+Y', { desc = "Yank line to clipboard" })
|
||||||
|
vim.keymap.set("n", "<leader>YY", ":%y+<CR>", { desc = "Yank buffer to clipboard" })
|
||||||
|
|
||||||
|
-- Delete to black hole register (no yank side effect)
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>d", '"_d', { desc = "Delete to black hole" })
|
||||||
|
vim.keymap.set("n", "<leader>dd", '"_dd', { desc = "Delete line to black hole" })
|
||||||
|
|
||||||
|
-- Paste from system clipboard
|
||||||
|
vim.keymap.set({ "n", "v", "x" }, "<leader>p", '"+p', { desc = "Paste from clipboard (after)" })
|
||||||
|
vim.keymap.set({ "n", "v", "x" }, "<leader>P", '"+P', { desc = "Paste from clipboard (before)" })
|
||||||
|
|
||||||
|
-- Paste over selection without overwriting the yank register
|
||||||
|
vim.keymap.set("x", "<leader>v", '"_dP', { desc = "Paste over selection" })
|
||||||
|
|
||||||
|
-- Utility
|
||||||
|
vim.keymap.set("n", "<leader><leader>s", ":update<CR>:source<CR>", { desc = "Save and source file" })
|
||||||
|
vim.keymap.set("n", "<leader><leader>x", ":!chmod +x %<CR>", { desc = "Make file executable" })
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
local out = vim.fn.system({
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
"git",
|
|
||||||
"clone",
|
|
||||||
"--filter=blob:none",
|
|
||||||
"--branch=stable",
|
|
||||||
lazyrepo,
|
|
||||||
lazypath
|
|
||||||
})
|
|
||||||
if vim.v.shell_error ~= 0 then
|
if vim.v.shell_error ~= 0 then
|
||||||
vim.api.nvim_echo({
|
vim.api.nvim_echo({
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
@@ -21,8 +14,47 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require'lazy'.setup({
|
require("lazy").setup({
|
||||||
spec = { { import = 'plugins' } },
|
spec = {
|
||||||
install = { colorscheme = { 'tokyonight-moon' } },
|
-- add LazyVim and import its plugins
|
||||||
checker = { enabled = false },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
|
-- LazyVim extras (must come before user plugins)
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
|
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
||||||
|
{ import = "lazyvim.plugins.extras.linting.eslint" },
|
||||||
|
{ import = "lazyvim.plugins.extras.editor.snacks_explorer" },
|
||||||
|
{ import = "lazyvim.plugins.extras.editor.snacks_picker" },
|
||||||
|
{ import = "lazyvim.plugins.extras.ai.supermaven" },
|
||||||
|
-- import/override with your plugins
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
defaults = {
|
||||||
|
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||||
|
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||||
|
lazy = false,
|
||||||
|
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||||
|
-- have outdated releases, which may break your Neovim install.
|
||||||
|
version = false, -- always use the latest git commit
|
||||||
|
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||||
|
},
|
||||||
|
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||||
|
checker = {
|
||||||
|
enabled = true, -- check for plugin updates periodically
|
||||||
|
notify = false, -- notify on update
|
||||||
|
}, -- automatically check for plugin updates
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- disable some rtp plugins
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
-- "matchit",
|
||||||
|
-- "matchparen",
|
||||||
|
-- "netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"tutor",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,21 +1,10 @@
|
|||||||
vim.o.number = true
|
-- Options are automatically loaded before lazy.nvim startup
|
||||||
vim.o.relativenumber = true
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
vim.o.winborder = 'rounded'
|
|
||||||
vim.o.tabstop = 2
|
vim.opt.winborder = "rounded"
|
||||||
vim.o.softtabstop = 2
|
vim.opt.updatetime = 50
|
||||||
vim.o.shiftwidth = 2
|
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||||
vim.o.expandtab = true
|
vim.opt.listchars = { trail = "⋅", nbsp = "⋅", tab = " " }
|
||||||
vim.o.smartindent = true
|
|
||||||
vim.o.swapfile = false
|
vim.g.ai_cmp = true
|
||||||
vim.o.undodir = os.getenv('HOME') .. '/.vim/undodir'
|
vim.g.markdown_recommended_style = 0
|
||||||
vim.o.undofile = true
|
|
||||||
vim.o.hlsearch = true
|
|
||||||
vim.o.incsearch = true
|
|
||||||
vim.o.termguicolors = true
|
|
||||||
vim.o.scrolloff = 4
|
|
||||||
vim.o.signcolumn = 'yes'
|
|
||||||
vim.o.updatetime = 50
|
|
||||||
vim.opt.isfname:append('@-@')
|
|
||||||
vim.cmd([[set list]])
|
|
||||||
vim.cmd([[set listchars=trail:⋅,nbsp:⋅,tab:\ \ ]])
|
|
||||||
vim.cmd(':hi statusline guibg=NONE')
|
|
||||||
|
|||||||
@@ -1,272 +0,0 @@
|
|||||||
return {
|
|
||||||
'yetone/avante.nvim',
|
|
||||||
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
|
|
||||||
-- ⚠️ must add this setting! ! !
|
|
||||||
build = vim.fn.has('win32') ~= 0
|
|
||||||
and 'powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false'
|
|
||||||
or 'make',
|
|
||||||
event = 'VeryLazy',
|
|
||||||
version = false, -- Never set this value to '*'! Never!
|
|
||||||
---@module 'avante'
|
|
||||||
---@type avante.Config
|
|
||||||
opts = {
|
|
||||||
instructions_file = 'avante.md',
|
|
||||||
provider = 'claude',
|
|
||||||
auto_suggestions_provider = 'claude',
|
|
||||||
providers = {
|
|
||||||
claude = {
|
|
||||||
endpoint = 'https://api.anthropic.com',
|
|
||||||
model = 'claude-sonnet-4-6',
|
|
||||||
timeout = 30000,
|
|
||||||
extra_request_body = {
|
|
||||||
temperature = 0.75,
|
|
||||||
max_tokens = 20480,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
openai = {
|
|
||||||
endpoint = 'https://api.openai.com/v1',
|
|
||||||
model = 'gpt-5.4',
|
|
||||||
extra_request_body = {
|
|
||||||
temperature = 1,
|
|
||||||
max_completion_tokens = 8192,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
acp_providers = {
|
|
||||||
["claude-code"] = {
|
|
||||||
command = "bunx",
|
|
||||||
args = { "@agentclientprotocol/claude-agent-acp" },
|
|
||||||
env = {
|
|
||||||
NODE_NO_WARNINGS = "1",
|
|
||||||
ANTHROPIC_API_KEY = os.getenv("ANTHROPIC_API_KEY"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rag_service = {
|
|
||||||
enabled = false,
|
|
||||||
host_path = '/home/gib/Documents/Code',
|
|
||||||
runner = 'docker',
|
|
||||||
llm = {
|
|
||||||
provider = 'openai',
|
|
||||||
endpoint = 'https://api.openai.com/v1',
|
|
||||||
api_key = 'OPENAI_API_KEY',
|
|
||||||
model = 'gpt-5-mini',
|
|
||||||
extra = {
|
|
||||||
temperature = 1,
|
|
||||||
max_tokens = 512,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
embed = {
|
|
||||||
provider = 'openai',
|
|
||||||
endpoint = 'https://api.openai.com/v1',
|
|
||||||
api_key = 'OPENAI_API_KEY',
|
|
||||||
model = 'text-embedding-3-large',
|
|
||||||
extra = nil,
|
|
||||||
},
|
|
||||||
docker_extra_args = '',
|
|
||||||
},
|
|
||||||
web_search_engine = {
|
|
||||||
provider = 'searxng',
|
|
||||||
proxy = nil,
|
|
||||||
},
|
|
||||||
system_prompt = function()
|
|
||||||
local hub = require('mcphub').get_hub_instance()
|
|
||||||
return hub and hub:get_active_servers_prompt() or ''
|
|
||||||
end,
|
|
||||||
custom_tools = function()
|
|
||||||
return {
|
|
||||||
require('mcphub.extensions.avante').mcp_tool(),
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
behaviour = {
|
|
||||||
auto_suggestions = false,
|
|
||||||
auto_set_highlight_group = true,
|
|
||||||
auto_set_keymaps = true,
|
|
||||||
auto_apply_diff_after_generation = false,
|
|
||||||
support_paste_from_clipboard = true,
|
|
||||||
minimize_diff = true,
|
|
||||||
enable_token_counting = true,
|
|
||||||
auto_approve_tool_permissions = true,
|
|
||||||
},
|
|
||||||
prompt_logger = {
|
|
||||||
enabled = true,
|
|
||||||
log_dir = vim.fn.stdpath("cache") .. "/avante_prompts", -- directory where logs are saved
|
|
||||||
fortune_cookie_on_success = false, -- shows a random fortune after each logged prompt (requires `fortune` installed)
|
|
||||||
next_prompt = {
|
|
||||||
normal = "<C-n>", -- load the next (newer) prompt log in normal mode
|
|
||||||
insert = "<C-n>",
|
|
||||||
},
|
|
||||||
prev_prompt = {
|
|
||||||
normal = "<C-p>", -- load the previous (older) prompt log in normal mode
|
|
||||||
insert = "<C-p>",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mappings = {
|
|
||||||
--- @class AvanteConflictMappings
|
|
||||||
diff = {
|
|
||||||
ours = 'co',
|
|
||||||
theirs = 'ct',
|
|
||||||
all_theirs = 'ca',
|
|
||||||
both = 'cb',
|
|
||||||
cursor = 'cc',
|
|
||||||
next = ']x',
|
|
||||||
prev = '[x',
|
|
||||||
},
|
|
||||||
suggestion = {
|
|
||||||
accept = '<M-l>',
|
|
||||||
next = '<M-]>',
|
|
||||||
prev = '<M-[>',
|
|
||||||
dismiss = '<C-]>',
|
|
||||||
},
|
|
||||||
jump = {
|
|
||||||
next = ']]',
|
|
||||||
prev = '[[',
|
|
||||||
},
|
|
||||||
submit = {
|
|
||||||
normal = '<CR>',
|
|
||||||
insert = '<C-s>',
|
|
||||||
},
|
|
||||||
cancel = {
|
|
||||||
normal = { '<C-c>', '<Esc>', 'q' },
|
|
||||||
insert = { '<C-c>' },
|
|
||||||
},
|
|
||||||
sidebar = {
|
|
||||||
apply_all = 'A',
|
|
||||||
apply_cursor = 'a',
|
|
||||||
retry_user_request = 'r',
|
|
||||||
edit_user_request = 'e',
|
|
||||||
switch_windows = '<Tab>',
|
|
||||||
reverse_switch_windows = '<S-Tab>',
|
|
||||||
remove_file = 'd',
|
|
||||||
add_file = '@',
|
|
||||||
close = { '<Esc>', 'q' },
|
|
||||||
close_from_input = nil,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
selection = {
|
|
||||||
enabled = true,
|
|
||||||
hint_display = 'delayed',
|
|
||||||
},
|
|
||||||
hints = { enabled = true },
|
|
||||||
|
|
||||||
windows = {
|
|
||||||
---@type "right" | "left" | "top" | "bottom"
|
|
||||||
position = "right", -- the position of the sidebar
|
|
||||||
wrap = true, -- similar to vim.o.wrap
|
|
||||||
width = 30, -- default % based on available width
|
|
||||||
sidebar_header = {
|
|
||||||
enabled = true, -- true, false to enable/disable the header
|
|
||||||
align = "center", -- left, center, right for title
|
|
||||||
rounded = true,
|
|
||||||
},
|
|
||||||
spinner = {
|
|
||||||
editing = { "⡀", "⠄", "⠂", "⠁", "⠈", "⠐", "⠠", "⢀", "⣀", "⢄", "⢂", "⢁", "⢈", "⢐", "⢠", "⣠", "⢤", "⢢", "⢡", "⢨", "⢰", "⣰", "⢴", "⢲", "⢱", "⢸", "⣸", "⢼", "⢺", "⢹", "⣹", "⢽", "⢻", "⣻", "⢿", "⣿" },
|
|
||||||
generating = { "·", "✢", "✳", "∗", "✻", "✽" }, -- Spinner characters for the 'generating' state
|
|
||||||
thinking = { "🤯", "🙄" }, -- Spinner characters for the 'thinking' state
|
|
||||||
},
|
|
||||||
input = {
|
|
||||||
prefix = "> ",
|
|
||||||
height = 8, -- Height of the input window in vertical layout
|
|
||||||
},
|
|
||||||
edit = {
|
|
||||||
border = "rounded",
|
|
||||||
start_insert = true, -- Start insert mode when opening the edit window
|
|
||||||
},
|
|
||||||
ask = {
|
|
||||||
floating = false, -- Open the 'AvanteAsk' prompt in a floating window
|
|
||||||
start_insert = true, -- Start insert mode when opening the ask window
|
|
||||||
border = "rounded",
|
|
||||||
---@type "ours" | "theirs"
|
|
||||||
focus_on_apply = "ours", -- which diff to focus after applying
|
|
||||||
},
|
|
||||||
},
|
|
||||||
highlights = {
|
|
||||||
diff = {
|
|
||||||
current = 'DiffText',
|
|
||||||
incoming = 'DiffAdd',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
--- @class AvanteConflictUserConfig
|
|
||||||
diff = {
|
|
||||||
autojump = true,
|
|
||||||
---@type string | fun(): any
|
|
||||||
list_opener = 'copen',
|
|
||||||
override_timeoutlen = 500,
|
|
||||||
},
|
|
||||||
suggestion = {
|
|
||||||
debounce = 600,
|
|
||||||
throttle = 600,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
{ 'nvim-lua/plenary.nvim' },
|
|
||||||
{ 'MunifTanjim/nui.nvim' },
|
|
||||||
{ 'hrsh7th/nvim-cmp' },
|
|
||||||
{ 'nvim-treesitter/nvim-treesitter' },
|
|
||||||
{ 'stevearc/dressing.nvim' },
|
|
||||||
{ 'nvim-tree/nvim-web-devicons' },
|
|
||||||
{ 'folke/snacks.nvim' },
|
|
||||||
{
|
|
||||||
'ravitemer/mcphub.nvim',
|
|
||||||
build = "bun install -g mcp-hub@latest",
|
|
||||||
config = function()
|
|
||||||
require'mcphub'.setup({
|
|
||||||
config = vim.fn.expand('/home/gib/.config/mcphub/servers.json'),
|
|
||||||
port = 37373,
|
|
||||||
shutdown_delay = 60 * 10 * 000,
|
|
||||||
use_bundled_binary = false,
|
|
||||||
mcp_request_timeout = 60000,
|
|
||||||
auto_approve = true,
|
|
||||||
auto_toggle_mcp_servers = true,
|
|
||||||
extensions = {
|
|
||||||
avante = {
|
|
||||||
make_slash_commands = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
native_servers = {},
|
|
||||||
ui = {
|
|
||||||
window = {
|
|
||||||
width = 0.8,
|
|
||||||
height = 0.8,
|
|
||||||
align = 'center',
|
|
||||||
relative = 'editor',
|
|
||||||
zindex = 50,
|
|
||||||
border = 'rounded',
|
|
||||||
},
|
|
||||||
wo = {
|
|
||||||
winhl = 'Normal:MCPHubNormal,FloatBorder:MCPHubBorder',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
log = {
|
|
||||||
level = vim.log.levels.WARN,
|
|
||||||
to_file = false,
|
|
||||||
file_path = nil,
|
|
||||||
prefix = 'MCPHub',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
-- 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,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'MeanderingProgrammer/render-markdown.nvim',
|
|
||||||
opts = {
|
|
||||||
file_types = { 'markdown', 'Avante' },
|
|
||||||
},
|
|
||||||
ft = { 'markdown', 'Avante' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
return {
|
|
||||||
'romgrk/barbar.nvim',
|
|
||||||
dependencies = {
|
|
||||||
'lewis6991/gitsigns.nvim',
|
|
||||||
'nvim-tree/nvim-web-devicons',
|
|
||||||
},
|
|
||||||
init = function() vim.g.barbar_auto_setup = false end,
|
|
||||||
opts = {
|
|
||||||
animation = true,
|
|
||||||
insert_at_start = true,
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<C-h>", ":BufferPrevious<CR>", mode = "n", silent = true, desc = "Go to previous tab" },
|
|
||||||
{ "<C-l>", ":BufferNext<CR>", mode = "n", silent = true, desc = "Go to next tab" },
|
|
||||||
{ "<C-j>", ":BufferMovePrevious<CR>", mode = "n", silent = true, desc = "Move tab to previous position" },
|
|
||||||
{ "<C-k>", ":BufferMoveNext<CR>", mode = "n", silent = true, desc = "Move tab to next position" },
|
|
||||||
{ "<C-q>", ":BufferClose<CR>", mode = "n", silent = true, desc = "Close current tab" },
|
|
||||||
{ "<C-a>", ":BufferCloseAllButCurrent<CR>", mode = "n", silent = true, desc = "Close all tabs except current" },
|
|
||||||
},
|
|
||||||
version = '^1.0.0', -- optional: only update when a new 1.x version is released
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
return {
|
|
||||||
'laytan/cloak.nvim',
|
|
||||||
config = function()
|
|
||||||
require'cloak'.setup({
|
|
||||||
enabled = false,
|
|
||||||
cloak_character = "•",
|
|
||||||
highlight_group = "Comment",
|
|
||||||
patterns = {
|
|
||||||
{
|
|
||||||
file_pattern = {
|
|
||||||
'.env*',
|
|
||||||
'wrangler.toml',
|
|
||||||
'.dev.vars',
|
|
||||||
},
|
|
||||||
cloak_pattern = "=.+"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
return {
|
|
||||||
'folke/tokyonight.nvim',
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
opts = {
|
|
||||||
style = 'moon',
|
|
||||||
transparent = true,
|
|
||||||
on_colors = function(colors)
|
|
||||||
colors.comment = '#a0a7c5'
|
|
||||||
colors.fg_gutter = '#787f93'
|
|
||||||
colors.terminal_black = '#828bb8'
|
|
||||||
end,
|
|
||||||
on_highlights = function(hl, c)
|
|
||||||
hl['@markup.raw.markdown_inline'] = { bg = c.bg_highlight, fg = c.fg }
|
|
||||||
hl['RenderMarkdownCodeInline'] = { bg = c.bg_highlight, fg = c.fg }
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
config = function(_,opts)
|
|
||||||
require'tokyonight'.setup(opts)
|
|
||||||
vim.cmd.colorscheme('tokyonight-moon')
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
opts = {
|
||||||
|
style = "moon",
|
||||||
|
transparent = true,
|
||||||
|
on_colors = function(colors)
|
||||||
|
colors.comment = "#a0a7c5"
|
||||||
|
colors.fg_gutter = "#787f93"
|
||||||
|
colors.terminal_black = "#828bb8"
|
||||||
|
end,
|
||||||
|
on_highlights = function(highlights, colors)
|
||||||
|
-- Fix inline code visibility in markdown
|
||||||
|
highlights["@markup.raw.markdown_inline"] = {
|
||||||
|
bg = colors.terminal_black,
|
||||||
|
fg = colors.fg,
|
||||||
|
}
|
||||||
|
highlights["RenderMarkdownCodeInline"] = {
|
||||||
|
bg = colors.terminal_black,
|
||||||
|
fg = colors.fg,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = "tokyonight",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- Extras are imported in lua/config/lazy.lua to satisfy LazyVim's required load order:
|
||||||
|
-- lazyvim.plugins → lazyvim.plugins.extras.* → user plugins
|
||||||
|
return {}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
return {
|
|
||||||
'3rd/image.nvim',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require'image'.setup({
|
|
||||||
backend = "kitty",
|
|
||||||
integrations = {
|
|
||||||
markdown = {
|
|
||||||
enabled = true,
|
|
||||||
clear_in_insert_mode = false,
|
|
||||||
download_remote_images = true,
|
|
||||||
only_render_image_at_cursor = false,
|
|
||||||
filetypes = { "markdown", "vimwiki" },
|
|
||||||
},
|
|
||||||
neorg = {
|
|
||||||
enabled = true,
|
|
||||||
clear_in_insert_mode = false,
|
|
||||||
download_remote_images = true,
|
|
||||||
only_render_image_at_cursor = false,
|
|
||||||
filetypes = { "norg" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
max_width = nil,
|
|
||||||
max_height = nil,
|
|
||||||
max_width_window_percentage = nil,
|
|
||||||
max_height_window_percentage = 50,
|
|
||||||
kitty_method = "normal",
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
return {
|
|
||||||
'kawre/leetcode.nvim',
|
|
||||||
build = ':TSUpdate html',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-lua/plenary.nvim',
|
|
||||||
'MunifTanjim/nui.nvim',
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
arg = "lc",
|
|
||||||
lang = 'typescript',
|
|
||||||
injector = {
|
|
||||||
["python3"] = {
|
|
||||||
imports = function(default_imports)
|
|
||||||
vim.list_extend(default_imports, { "from .leetcode import *" })
|
|
||||||
return default_imports
|
|
||||||
end,
|
|
||||||
after = { "def test():", " print('test')" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
picker = { provider = 'telescope' },
|
|
||||||
image_support = true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
-- Language Options:
|
|
||||||
-- Bash: 'bash'
|
|
||||||
-- C: 'c'
|
|
||||||
-- C++: 'cpp'
|
|
||||||
-- C#: 'csharp'
|
|
||||||
-- Go: 'golang'
|
|
||||||
-- Java: 'java'
|
|
||||||
-- JavaScript: 'javascript'
|
|
||||||
-- Kotlin: 'kotlin'
|
|
||||||
-- PHP: 'php'
|
|
||||||
-- Python: 'python'
|
|
||||||
-- Rust: 'rust'
|
|
||||||
-- Swift: 'swift'
|
|
||||||
-- TypeScript: 'typescript'
|
|
||||||
@@ -1,391 +1,32 @@
|
|||||||
return {
|
return {
|
||||||
'mason-org/mason-lspconfig.nvim',
|
|
||||||
dependencies = {
|
|
||||||
{ 'neovim/nvim-lspconfig' },
|
|
||||||
{
|
{
|
||||||
'mason-org/mason.nvim',
|
"neovim/nvim-lspconfig",
|
||||||
opts = {
|
opts = {
|
||||||
ui = {
|
servers = {
|
||||||
icons = {
|
-- CSS / HTML / Tailwind
|
||||||
package_installed = "✓",
|
cssls = {},
|
||||||
package_pending = "➜",
|
html = {},
|
||||||
package_uninstalled = "✗",
|
tailwindcss = {},
|
||||||
|
-- Shell / Config
|
||||||
|
bashls = {},
|
||||||
|
yamlls = {},
|
||||||
|
-- Docker
|
||||||
|
dockerls = {},
|
||||||
|
docker_compose_language_service = {},
|
||||||
|
-- Systems languages
|
||||||
|
gopls = {},
|
||||||
|
rust_analyzer = {},
|
||||||
|
-- Web frameworks
|
||||||
|
svelte = {},
|
||||||
|
graphql = {},
|
||||||
|
-- Database / ORM
|
||||||
|
prismals = {},
|
||||||
|
sqlls = {},
|
||||||
|
-- PHP
|
||||||
|
intelephense = {},
|
||||||
|
-- Python
|
||||||
|
pyright = {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
{
|
|
||||||
'hrsh7th/nvim-cmp',
|
|
||||||
event = { 'InsertEnter', 'CmdlineEnter' },
|
|
||||||
config = function()
|
|
||||||
local cmp = require 'cmp'
|
|
||||||
local lspkind = require 'lspkind'
|
|
||||||
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
|
||||||
local luasnip = require 'luasnip'
|
|
||||||
cmp.setup({
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
completion = cmp.config.window.bordered(),
|
|
||||||
documentation = cmp.config.window.bordered(),
|
|
||||||
},
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
{ name = 'luasnip' },
|
|
||||||
{ name = 'supermaven' },
|
|
||||||
--{ name = 'copilot' },
|
|
||||||
}, {
|
|
||||||
--{ name = 'buffer', keyword_length = 4 },
|
|
||||||
{ name = 'path' },
|
|
||||||
--{ name = 'dotenv' },
|
|
||||||
--{ name = 'emoji' },
|
|
||||||
}),
|
|
||||||
formatting = {
|
|
||||||
format = lspkind.cmp_format({
|
|
||||||
mode = 'symbol',
|
|
||||||
maxwidth = { menu = 50, abbr = 50 },
|
|
||||||
symbol_map = {
|
|
||||||
Copilot = '',
|
|
||||||
Supermaven = "",
|
|
||||||
},
|
|
||||||
ellipsis_char = '...',
|
|
||||||
show_labelDetails = true,
|
|
||||||
before = function(_, vim_item)
|
|
||||||
return vim_item
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
|
||||||
['<C-y>'] = cmp.mapping.confirm({ select = true }),
|
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
['<C-e>'] = cmp.mapping.abort(),
|
|
||||||
}),
|
|
||||||
preselect = cmp.PreselectMode.Item,
|
|
||||||
completion = {
|
|
||||||
completeopt = 'menu,menuone,noinsert',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
cmp.setup.filetype('gitcommit', {
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = 'git' },
|
|
||||||
}, {
|
|
||||||
{ name = 'buffer' },
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
cmp.setup.filetype({ 'json', 'jsonc' }, {
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
{ name = 'npm' },
|
|
||||||
}, {
|
|
||||||
{ name = 'buffer', keyword_length = 4 },
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
cmp.setup.cmdline({ '/', '?' }, {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = {
|
|
||||||
{ name = 'buffer' },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
cmp.setup.cmdline(':', {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = 'path' },
|
|
||||||
}, {
|
|
||||||
{ name = 'cmdline' },
|
|
||||||
}),
|
|
||||||
matching = { disallow_symbol_nonprefix_matching = false },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{ 'hrsh7th/cmp-nvim-lsp' },
|
|
||||||
{ 'nvim-lua/plenary.nvim' },
|
|
||||||
{ 'hrsh7th/cmp-path' },
|
|
||||||
{
|
|
||||||
'supermaven-inc/supermaven-nvim',
|
|
||||||
config = function()
|
|
||||||
require'supermaven-nvim'.setup({
|
|
||||||
disable_inline_completion = true,
|
|
||||||
disable_keymaps = true,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
--{
|
|
||||||
--'zbirenbaum/copilot-cmp',
|
|
||||||
--config = function()
|
|
||||||
--require 'copilot_cmp'.setup()
|
|
||||||
--end,
|
|
||||||
--},
|
|
||||||
{ 'hrsh7th/cmp-buffer' },
|
|
||||||
{ 'hrsh7th/cmp-emoji' },
|
|
||||||
{ 'SergioRibera/cmp-dotenv' },
|
|
||||||
{ 'saadparwaiz1/cmp_luasnip' },
|
|
||||||
{ 'onsails/lspkind.nvim' },
|
|
||||||
{ 'rafamadriz/friendly-snippets' },
|
|
||||||
{
|
|
||||||
'petertriho/cmp-git',
|
|
||||||
config = function()
|
|
||||||
require 'cmp_git'.setup({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'David-Kunz/cmp-npm',
|
|
||||||
config = function()
|
|
||||||
require 'cmp-npm'.setup({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'j-hui/fidget.nvim',
|
|
||||||
config = function()
|
|
||||||
require 'fidget'.setup({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'stevearc/conform.nvim',
|
|
||||||
config = function()
|
|
||||||
require 'conform'.setup({
|
|
||||||
formatters_by_ft = {
|
|
||||||
cs = { 'csharpier', 'lsp' },
|
|
||||||
javascript = { 'prettierd', 'prettier' },
|
|
||||||
javascriptreact = { 'prettierd', 'prettier' },
|
|
||||||
typescript = { 'prettierd', 'prettier' },
|
|
||||||
typescriptreact = { 'prettierd', 'prettier' },
|
|
||||||
json = { 'prettierd', 'prettier' },
|
|
||||||
html = { 'prettierd', 'prettier' },
|
|
||||||
css = { 'prettierd', 'prettier' },
|
|
||||||
lua = { 'stylua' },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_user_command(
|
|
||||||
'Format',
|
|
||||||
function(args)
|
|
||||||
local range
|
|
||||||
if args.count ~= -1 then
|
|
||||||
local start_line = vim.fn.line("'<")
|
|
||||||
local end_line = vim.fn.line("'>")
|
|
||||||
range = { start = { start_line, 0 }, ["end"] = { end_line, 0 } }
|
|
||||||
end
|
|
||||||
require 'conform'.format({
|
|
||||||
async = true,
|
|
||||||
lsp_fallback = true,
|
|
||||||
range = range,
|
|
||||||
})
|
|
||||||
end, { range = true, desc = "Format current buffer or range" })
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
'<leader>fk',
|
|
||||||
':Format<CR>',
|
|
||||||
mode = { 'n', 'v' },
|
|
||||||
silent = true,
|
|
||||||
desc = "Format with conform",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'L3MON4D3/LuaSnip',
|
|
||||||
version = 'v2.*',
|
|
||||||
build = 'make install_jsregexp',
|
|
||||||
},
|
|
||||||
--{
|
|
||||||
--'zbirenbaum/copilot.lua',
|
|
||||||
--cmd = 'Copilot',
|
|
||||||
--event = 'InsertEnter',
|
|
||||||
--config = function()
|
|
||||||
--require 'copilot'.setup({
|
|
||||||
---- Disable native ghost text so copilot-cmp can manage suggestions instead
|
|
||||||
--suggestion = { enabled = false },
|
|
||||||
--panel = { enabled = false },
|
|
||||||
--})
|
|
||||||
--end,
|
|
||||||
--},
|
|
||||||
--{ 'AndreM222/copilot-lualine' },
|
|
||||||
{
|
|
||||||
'windwp/nvim-autopairs',
|
|
||||||
event = 'InsertEnter',
|
|
||||||
config = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'windwp/nvim-ts-autotag',
|
|
||||||
config = function()
|
|
||||||
require 'nvim-ts-autotag'.setup({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{ 'hrsh7th/cmp-cmdline' },
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
vim.diagnostic.config({
|
|
||||||
float = {
|
|
||||||
focusable = false,
|
|
||||||
style = 'minimal',
|
|
||||||
border = 'rounded',
|
|
||||||
source = true,
|
|
||||||
header = '',
|
|
||||||
prefix = '',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
require 'mason'.setup({})
|
|
||||||
local cmp = require 'cmp'
|
|
||||||
local cmp_lsp = require 'cmp_nvim_lsp'
|
|
||||||
local lspconfig = require 'lspconfig'
|
|
||||||
local capabilities = vim.tbl_deep_extend(
|
|
||||||
'force',
|
|
||||||
{},
|
|
||||||
vim.lsp.protocol.make_client_capabilities(),
|
|
||||||
cmp_lsp.default_capabilities()
|
|
||||||
)
|
|
||||||
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
|
||||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
|
||||||
--cmp.event:on('menu_opened', function()
|
|
||||||
--vim.b.copilot_suggestion_hidden = true
|
|
||||||
--end)
|
|
||||||
--cmp.event:on('menu_closed', function()
|
|
||||||
--vim.b.copilot_suggestion_hidden = false
|
|
||||||
--end)
|
|
||||||
require 'mason-lspconfig'.setup({
|
|
||||||
ensure_installed = {
|
|
||||||
'angularls',
|
|
||||||
'bashls',
|
|
||||||
'clangd',
|
|
||||||
'cssls',
|
|
||||||
'css_variables',
|
|
||||||
'cssmodules_ls',
|
|
||||||
'docker_compose_language_service',
|
|
||||||
'docker_language_server',
|
|
||||||
'dockerls',
|
|
||||||
'eslint',
|
|
||||||
'gopls',
|
|
||||||
'graphql',
|
|
||||||
'html',
|
|
||||||
'htmx',
|
|
||||||
'intelephense',
|
|
||||||
'jsonls',
|
|
||||||
'kotlin_lsp',
|
|
||||||
'ltex',
|
|
||||||
'ltex_plus',
|
|
||||||
'lua_ls',
|
|
||||||
'markdown_oxide',
|
|
||||||
'phpactor',
|
|
||||||
'postgres_lsp',
|
|
||||||
'prismals',
|
|
||||||
'pylyzer',
|
|
||||||
'pyright',
|
|
||||||
'remark_ls',
|
|
||||||
'rust_analyzer',
|
|
||||||
'sqlls',
|
|
||||||
'svelte',
|
|
||||||
'tailwindcss',
|
|
||||||
'tinymist',
|
|
||||||
'ts_ls',
|
|
||||||
--'vtsls',
|
|
||||||
'yamlls',
|
|
||||||
},
|
|
||||||
handlers = {
|
|
||||||
function(server_name)
|
|
||||||
lspconfig[server_name].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
zls = function()
|
|
||||||
lspconfig.zls.setup({
|
|
||||||
root_dir = lspconfig.util.root_pattern('.git', 'build.zig', 'zls.json'),
|
|
||||||
settings = {
|
|
||||||
zls = {
|
|
||||||
enable_inlay_hints = true,
|
|
||||||
enable_snippets = true,
|
|
||||||
warn_style = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.g.zig_fmt_parse_errors = 0
|
|
||||||
vim.g.zig_fmt_autosave = 0
|
|
||||||
end,
|
|
||||||
['vtsls'] = function()
|
|
||||||
lspconfig.vtsls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
root_dir = lspconfig.util.root_pattern('turbo.json', 'pnpm-workspace.yaml', '.git'),
|
|
||||||
settings = {
|
|
||||||
vtsls = {
|
|
||||||
autoUseWorkspaceTsdk = true,
|
|
||||||
experimental = {
|
|
||||||
completion = {
|
|
||||||
enableServerSideFuzzyMatch = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
typescript = {
|
|
||||||
updateImportsOnFileMove = { enabled = 'always' },
|
|
||||||
suggest = { completeFunctionCalls = true },
|
|
||||||
format = {
|
|
||||||
indentSize = 2,
|
|
||||||
tabSize = 2,
|
|
||||||
convertTabsToSpaces = true,
|
|
||||||
},
|
|
||||||
preferences = {
|
|
||||||
importModuleSpecifier = 'non-relative',
|
|
||||||
includePackageJsonAutoImports = 'auto',
|
|
||||||
},
|
|
||||||
inlayHints = {
|
|
||||||
parameterNames = { enabled = 'literals' },
|
|
||||||
parameterTypes = { enabled = true },
|
|
||||||
variableTypes = { enabled = true },
|
|
||||||
propertyDeclarationTypes = { enabled = true },
|
|
||||||
functionLikeReturnTypes = { enabled = true },
|
|
||||||
enumMemberValues = { enabled = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
javascript = {
|
|
||||||
updateImportsOnFileMove = { enabled = 'always' },
|
|
||||||
suggest = { completeFunctionCalls = true },
|
|
||||||
format = {
|
|
||||||
indentSize = 2,
|
|
||||||
tabSize = 2,
|
|
||||||
convertTabsToSpaces = true,
|
|
||||||
},
|
|
||||||
inlayHints = {
|
|
||||||
parameterNames = { enabled = 'literals' },
|
|
||||||
parameterTypes = { enabled = true },
|
|
||||||
variableTypes = { enabled = true },
|
|
||||||
propertyDeclarationTypes = { enabled = true },
|
|
||||||
functionLikeReturnTypes = { enabled = true },
|
|
||||||
enumMemberValues = { enabled = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
['lua_ls'] = function()
|
|
||||||
lspconfig.lua_ls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
runtime = { version = 'LuaJIT' },
|
|
||||||
diagnostics = { globals = { 'vim' } },
|
|
||||||
workspace = {
|
|
||||||
library = vim.api.nvim_get_runtime_file('', true),
|
|
||||||
checkThirdParty = false,
|
|
||||||
maxPreload = 100000,
|
|
||||||
preloadFileSize = 10000,
|
|
||||||
},
|
|
||||||
telemetry = { enable = false },
|
|
||||||
format = {
|
|
||||||
enable = true,
|
|
||||||
defaultConfig = {
|
|
||||||
indent_style = 'space',
|
|
||||||
indent_size = '2',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
return {
|
|
||||||
'nvim-lualine/lualine.nvim',
|
|
||||||
config = function()
|
|
||||||
require'lualine'.setup({
|
|
||||||
options = {
|
|
||||||
icons_enabled = true,
|
|
||||||
theme = 'tokyonight-moon',
|
|
||||||
component_separators = { left = '', right = ''},
|
|
||||||
section_separators = { left = '', right = ''},
|
|
||||||
disabled_filetypes = {
|
|
||||||
statusline = {},
|
|
||||||
winbar = {},
|
|
||||||
},
|
|
||||||
ignore_focus = {},
|
|
||||||
always_divide_middle = true,
|
|
||||||
always_show_tabline = true,
|
|
||||||
globalstatus = false,
|
|
||||||
refresh = {
|
|
||||||
statusline = 1000,
|
|
||||||
tabline = 1000,
|
|
||||||
winbar = 1000,
|
|
||||||
refresh_time = 16,
|
|
||||||
events = {
|
|
||||||
'WinEnter',
|
|
||||||
'BufEnter',
|
|
||||||
'BufWritePost',
|
|
||||||
'SessionLoadPost',
|
|
||||||
'FileChangedShellPost',
|
|
||||||
'VimResized',
|
|
||||||
'Filetype',
|
|
||||||
'CursorMoved',
|
|
||||||
'CursorMovedI',
|
|
||||||
'ModeChanged',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = {'mode'},
|
|
||||||
lualine_b = {
|
|
||||||
'branch',
|
|
||||||
'diff',
|
|
||||||
{
|
|
||||||
'diagnostics',
|
|
||||||
sources = { "nvim_diagnostic" },
|
|
||||||
symbols = { error = ' ', warn = ' ', info = ' ', hint = ' ' }
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_c = {'filename'},
|
|
||||||
lualine_x = {'copilot', 'encoding', 'fileformat', 'filetype'},
|
|
||||||
lualine_y = {'progress'},
|
|
||||||
lualine_z = {'location'}
|
|
||||||
},
|
|
||||||
inactive_sections = {
|
|
||||||
lualine_a = {},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_c = {'filename'},
|
|
||||||
lualine_x = {'location'},
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {}
|
|
||||||
},
|
|
||||||
tabline = {},
|
|
||||||
winbar = {},
|
|
||||||
inactive_winbar = {},
|
|
||||||
extensions = {}
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
{ 'nvim-tree/nvim-web-devicons' },
|
|
||||||
{ 'folke/tokyonight.nvim' },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
return {
|
||||||
|
-- Mask .env values in the buffer
|
||||||
|
{
|
||||||
|
"laytan/cloak.nvim",
|
||||||
|
event = "BufReadPre",
|
||||||
|
opts = {
|
||||||
|
enabled = true,
|
||||||
|
cloak_character = "*",
|
||||||
|
patterns = {
|
||||||
|
{
|
||||||
|
file_pattern = ".env*",
|
||||||
|
cloak_pattern = "=.+",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Terminal image rendering via Kitty backend
|
||||||
|
{
|
||||||
|
"3rd/image.nvim",
|
||||||
|
opts = {
|
||||||
|
backend = "kitty",
|
||||||
|
integrations = {
|
||||||
|
markdown = {
|
||||||
|
enabled = true,
|
||||||
|
clear_in_insert_mode = false,
|
||||||
|
download_remote_images = true,
|
||||||
|
only_render_image_at_cursor = false,
|
||||||
|
filetypes = { "markdown", "vimwiki" },
|
||||||
|
},
|
||||||
|
typst = { enabled = true, filetypes = { "typst" } },
|
||||||
|
},
|
||||||
|
max_height_window_percentage = 50,
|
||||||
|
window_overlap_clear_enabled = false,
|
||||||
|
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Paste images into markdown/typst from clipboard or drag-and-drop
|
||||||
|
{
|
||||||
|
"HakonHarnes/img-clip.nvim",
|
||||||
|
event = "BufEnter",
|
||||||
|
opts = {
|
||||||
|
default = {
|
||||||
|
embed_image_as_base64 = false,
|
||||||
|
prompt_for_file_name = false,
|
||||||
|
drag_and_drop = {
|
||||||
|
insert_mode = true,
|
||||||
|
},
|
||||||
|
use_absolute_path = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Render markdown formatting in-buffer
|
||||||
|
{
|
||||||
|
"MeanderingProgrammer/render-markdown.nvim",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Live preview for Typst documents
|
||||||
|
{
|
||||||
|
"chomosuke/typst-preview.nvim",
|
||||||
|
lazy = false,
|
||||||
|
version = "1.*",
|
||||||
|
build = function()
|
||||||
|
require("typst-preview").update()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- LeetCode integration
|
||||||
|
{
|
||||||
|
"kawre/leetcode.nvim",
|
||||||
|
cmd = "Leet",
|
||||||
|
opts = {
|
||||||
|
lang = "typescript",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
return {}
|
||||||
@@ -1,327 +0,0 @@
|
|||||||
return {
|
|
||||||
'nvim-neo-tree/neo-tree.nvim',
|
|
||||||
config = function()
|
|
||||||
vim.diagnostic.config({
|
|
||||||
signs = {
|
|
||||||
text = {
|
|
||||||
[vim.diagnostic.severity.ERROR] = '',
|
|
||||||
[vim.diagnostic.severity.WARN] = '',
|
|
||||||
[vim.diagnostic.severity.INFO] = '',
|
|
||||||
[vim.diagnostic.severity.HINT] = '',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
require'neo-tree'.setup({
|
|
||||||
close_if_last_window = true,
|
|
||||||
enable_git_status = true,
|
|
||||||
enable_diagnostics = true,
|
|
||||||
open_files_do_not_replace_types = { 'terminal', 'trouble', 'qf' },
|
|
||||||
open_files_using_relative_paths = false,
|
|
||||||
sort_case_insensitive = true,
|
|
||||||
sort_function = nil,
|
|
||||||
default_component_configs = {
|
|
||||||
container = {
|
|
||||||
enable_character_fade = true,
|
|
||||||
},
|
|
||||||
indent = {
|
|
||||||
indent_size = 2,
|
|
||||||
padding = 1,
|
|
||||||
with_markers = true,
|
|
||||||
indent_marker = '│',
|
|
||||||
last_indent_marker = '└',
|
|
||||||
highlight = 'NeoTreeIndentMarker',
|
|
||||||
with_expanders = nil,
|
|
||||||
expander_collapsed = '',
|
|
||||||
expander_expanded = '',
|
|
||||||
expander_highlight = 'NeoTreeExpander',
|
|
||||||
},
|
|
||||||
icon = {
|
|
||||||
folder_closed = '',
|
|
||||||
folder_open = '',
|
|
||||||
folder_empty = '',
|
|
||||||
provider = function(icon, node, state)
|
|
||||||
if node.type == 'file' or node.type == 'terminal' then
|
|
||||||
local success, web_devicons = pcall(require, 'nvim-web-devicons')
|
|
||||||
local name = node.type == 'terminal' and 'terminal' or node.name
|
|
||||||
if success then
|
|
||||||
local devicon, hl = web_devicons.get_icon(name)
|
|
||||||
icon.text = devicon or icon.text
|
|
||||||
icon.highlight = hl or icon.highlight
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
default = '*',
|
|
||||||
highlight = 'NeoTreeFileIcon',
|
|
||||||
},
|
|
||||||
modified = {
|
|
||||||
symbol = '[+]',
|
|
||||||
highlight = 'NeoTreeModified',
|
|
||||||
},
|
|
||||||
name = {
|
|
||||||
trailing_slash = false,
|
|
||||||
use_git_status_colors = true,
|
|
||||||
highlight = 'NeoTreeFileName',
|
|
||||||
},
|
|
||||||
git_status = {
|
|
||||||
symbols = {
|
|
||||||
added = '',
|
|
||||||
modified = '',
|
|
||||||
deleted = '✖',
|
|
||||||
renamed = '',
|
|
||||||
untracked = '',
|
|
||||||
ignored = '',
|
|
||||||
unstaged = '',
|
|
||||||
staged = '',
|
|
||||||
conflict = '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
file_size = {
|
|
||||||
enabled = true,
|
|
||||||
width = 12,
|
|
||||||
required_width = 64,
|
|
||||||
},
|
|
||||||
type = {
|
|
||||||
enabled = true,
|
|
||||||
width = 10,
|
|
||||||
required_width = 122,
|
|
||||||
},
|
|
||||||
last_modified = {
|
|
||||||
enabled = true,
|
|
||||||
width = 20,
|
|
||||||
required_width = 88,
|
|
||||||
},
|
|
||||||
created = {
|
|
||||||
enabled = true,
|
|
||||||
width = 20,
|
|
||||||
required_width = 110,
|
|
||||||
},
|
|
||||||
symlink_target = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
position = 'left',
|
|
||||||
width = 30,
|
|
||||||
mapping_options = {
|
|
||||||
noremap = true,
|
|
||||||
nowait = true,
|
|
||||||
},
|
|
||||||
mappings = {
|
|
||||||
['<space>'] = {
|
|
||||||
'toggle_node',
|
|
||||||
nowait = false,
|
|
||||||
},
|
|
||||||
['<2-LeftMouse>'] = 'open',
|
|
||||||
['<cr>'] = 'open',
|
|
||||||
['<esc>'] = 'cancel',
|
|
||||||
['P'] = { 'toggle_preview', config = { use_float = true, use_image_nvim = true } },
|
|
||||||
['l'] = 'focus_preview',
|
|
||||||
['S'] = 'open_split',
|
|
||||||
['s'] = 'open_vsplit',
|
|
||||||
['t'] = 'open_tabnew',
|
|
||||||
['w'] = 'open_with_window_picker',
|
|
||||||
['C'] = 'close_node',
|
|
||||||
['z'] = 'close_all_nodes',
|
|
||||||
['a'] = {
|
|
||||||
'add',
|
|
||||||
config = {
|
|
||||||
show_path = 'relative',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
['A'] = 'add_directory',
|
|
||||||
['d'] = 'delete',
|
|
||||||
['r'] = 'rename',
|
|
||||||
['b'] = 'rename_basename',
|
|
||||||
['y'] = 'copy_to_clipboard',
|
|
||||||
['x'] = 'cut_to_clipboard',
|
|
||||||
['p'] = 'paste_from_clipboard',
|
|
||||||
['c'] = { 'copy', config = { show_path = 'relative' } },
|
|
||||||
['m'] = { 'move', config = { show_path = 'relative' } },
|
|
||||||
['q'] = 'close_window',
|
|
||||||
['R'] = 'refresh',
|
|
||||||
['?'] = 'show_help',
|
|
||||||
['<'] = 'prev_source',
|
|
||||||
['>'] = 'next_source',
|
|
||||||
['i'] = 'show_file_details',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
filesystem = {
|
|
||||||
filtered_items = {
|
|
||||||
visible = false,
|
|
||||||
hide_dotfiles = true,
|
|
||||||
hide_gitignored = true,
|
|
||||||
hide_hidden = true,
|
|
||||||
hide_by_name = {
|
|
||||||
'node_modules',
|
|
||||||
'.next',
|
|
||||||
'.vscode',
|
|
||||||
'.idea',
|
|
||||||
},
|
|
||||||
hide_by_pattern = {
|
|
||||||
'*.meta',
|
|
||||||
'*/src/*/tsconfig.json',
|
|
||||||
},
|
|
||||||
always_show = {
|
|
||||||
'.gitignored',
|
|
||||||
},
|
|
||||||
always_show_by_pattern = { -- uses glob style patterns
|
|
||||||
'.env*',
|
|
||||||
},
|
|
||||||
never_show = {
|
|
||||||
'.DS_Store',
|
|
||||||
'thumbs.db'
|
|
||||||
},
|
|
||||||
never_show_by_pattern = {},
|
|
||||||
},
|
|
||||||
follow_current_file = {
|
|
||||||
enabled = false,
|
|
||||||
leave_dirs_open = false,
|
|
||||||
},
|
|
||||||
group_empty_dirs = false,
|
|
||||||
hijack_netrw_behavior = 'open_default',
|
|
||||||
use_libuv_file_watcher = false,
|
|
||||||
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()
|
|
||||||
if not open then
|
|
||||||
require('avante.api').ask()
|
|
||||||
sidebar = require('avante').get()
|
|
||||||
end
|
|
||||||
sidebar.file_selector:add_selected_file(relative_path)
|
|
||||||
if not open then
|
|
||||||
sidebar.file_selector:remove_selected_file('neo-tree filesystem [1]')
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
mappings = {
|
|
||||||
['<bs>'] = 'navigate_up',
|
|
||||||
['.'] = 'set_root',
|
|
||||||
['H'] = 'toggle_hidden',
|
|
||||||
['/'] = 'fuzzy_finder',
|
|
||||||
['D'] = 'fuzzy_finder_directory',
|
|
||||||
['#'] = 'fuzzy_sorter',
|
|
||||||
-- ['D'] = 'fuzzy_sorter_directory',
|
|
||||||
['f'] = 'filter_on_submit',
|
|
||||||
['<c-x>'] = 'clear_filter',
|
|
||||||
['[g'] = 'prev_git_modified',
|
|
||||||
[']g'] = 'next_git_modified',
|
|
||||||
['o'] = {
|
|
||||||
'show_help',
|
|
||||||
nowait = false,
|
|
||||||
config = { title = 'Order by', prefix_key = 'o' },
|
|
||||||
},
|
|
||||||
['oa'] = 'avante_add_files',
|
|
||||||
['oc'] = { 'order_by_created', nowait = false },
|
|
||||||
['od'] = { 'order_by_diagnostics', nowait = false },
|
|
||||||
['og'] = { 'order_by_git_status', nowait = false },
|
|
||||||
['om'] = { 'order_by_modified', nowait = false },
|
|
||||||
['on'] = { 'order_by_name', nowait = false },
|
|
||||||
['os'] = { 'order_by_size', nowait = false },
|
|
||||||
['ot'] = { 'order_by_type', nowait = false },
|
|
||||||
},
|
|
||||||
fuzzy_finder_mappings = {
|
|
||||||
['<down>'] = 'move_cursor_down',
|
|
||||||
['<C-n>'] = 'move_cursor_down',
|
|
||||||
['<up>'] = 'move_cursor_up',
|
|
||||||
['<C-p>'] = 'move_cursor_up',
|
|
||||||
['<esc>'] = 'close',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
buffers = {
|
|
||||||
follow_current_file = {
|
|
||||||
enabled = true,
|
|
||||||
leave_dirs_open = false,
|
|
||||||
},
|
|
||||||
group_empty_dirs = true,
|
|
||||||
show_unloaded = true,
|
|
||||||
window = {
|
|
||||||
mappings = {
|
|
||||||
['d'] = 'buffer_delete',
|
|
||||||
['bd'] = 'buffer_delete',
|
|
||||||
['<bs>'] = 'navigate_up',
|
|
||||||
['.'] = 'set_root',
|
|
||||||
['o'] = {
|
|
||||||
'show_help',
|
|
||||||
nowait = false,
|
|
||||||
config = { title = 'Order by', prefix_key = 'o' },
|
|
||||||
},
|
|
||||||
['oc'] = { 'order_by_created', nowait = false },
|
|
||||||
['od'] = { 'order_by_diagnostics', nowait = false },
|
|
||||||
['om'] = { 'order_by_modified', nowait = false },
|
|
||||||
['on'] = { 'order_by_name', nowait = false },
|
|
||||||
['os'] = { 'order_by_size', nowait = false },
|
|
||||||
['ot'] = { 'order_by_type', nowait = false },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
git_status = {
|
|
||||||
window = {
|
|
||||||
position = 'float',
|
|
||||||
mappings = {
|
|
||||||
['A'] = 'git_add_all',
|
|
||||||
['gu'] = 'git_unstage_file',
|
|
||||||
['gU'] = 'git_undo_last_commit',
|
|
||||||
['ga'] = 'git_add_file',
|
|
||||||
['gr'] = 'git_revert_file',
|
|
||||||
['gc'] = 'git_commit',
|
|
||||||
['gp'] = 'git_push',
|
|
||||||
['gg'] = 'git_commit_and_push',
|
|
||||||
['o'] = {
|
|
||||||
'show_help',
|
|
||||||
nowait = false,
|
|
||||||
config = { title = 'Order by', prefix_key = 'o' },
|
|
||||||
},
|
|
||||||
['oc'] = { 'order_by_created', nowait = false },
|
|
||||||
['od'] = { 'order_by_diagnostics', nowait = false },
|
|
||||||
['om'] = { 'order_by_modified', nowait = false },
|
|
||||||
['on'] = { 'order_by_name', nowait = false },
|
|
||||||
['os'] = { 'order_by_size', nowait = false },
|
|
||||||
['ot'] = { 'order_by_type', nowait = false },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
'<leader>t',
|
|
||||||
':Neotree toggle<CR>',
|
|
||||||
mode = { 'n', 'v', 'x'},
|
|
||||||
silent = true,
|
|
||||||
desc = 'Toggle NeoTree',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>T',
|
|
||||||
':Neotree focus<CR>',
|
|
||||||
mode = { 'n', 'v', 'x' },
|
|
||||||
silent = true, desc = 'Focus NeoTree',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
branch = 'v3.x',
|
|
||||||
dependencies = {
|
|
||||||
{ 'nvim-lua/plenary.nvim', },
|
|
||||||
{ 'MunifTanjim/nui.nvim', },
|
|
||||||
{ 'nvim-tree/nvim-web-devicons', },
|
|
||||||
{
|
|
||||||
'antosha417/nvim-lsp-file-operations',
|
|
||||||
config = function()
|
|
||||||
require'lsp-file-operations'.setup({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{ '3rd/image.nvim', },
|
|
||||||
{
|
|
||||||
's1n7ax/nvim-window-picker',
|
|
||||||
version = '2.*',
|
|
||||||
config = function()
|
|
||||||
require'window-picker'.setup({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lazy = false,
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
return {
|
|
||||||
'preservim/nerdcommenter',
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
'<leader>c',
|
|
||||||
'<Plug>NERDCommenterToggle',
|
|
||||||
mode = { 'n', 'v', 'x' },
|
|
||||||
silent = true,
|
|
||||||
desc = 'Toggle commenting line',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +1,40 @@
|
|||||||
return {
|
return {
|
||||||
'folke/snacks.nvim',
|
{
|
||||||
dependencies = {
|
"folke/snacks.nvim",
|
||||||
{ 'echasnovski/mini.icons', },
|
keys = {
|
||||||
|
{ "<leader>t", function() Snacks.explorer({ cwd = LazyVim.root() }) end, desc = "Explorer (Root Dir)" },
|
||||||
|
{ "<leader>T", function() Snacks.explorer() end, desc = "Explorer (cwd)" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
picker = {
|
||||||
|
sources = {
|
||||||
|
explorer = {
|
||||||
|
hidden = false, -- dotfiles hidden by default; H to toggle
|
||||||
|
ignored = false, -- gitignored files hidden by default; I to toggle
|
||||||
|
follow_file = true, -- auto-reveal current buffer in tree
|
||||||
|
git_status = true,
|
||||||
|
git_untracked = true,
|
||||||
|
watch = true, -- live file watcher
|
||||||
|
exclude = { "node_modules", ".next", ".vscode", ".idea", ".DS_Store", "thumbs.db" },
|
||||||
|
include = { ".env*" }, -- always show .env files regardless of hidden/ignored
|
||||||
|
layout = {
|
||||||
|
layout = {
|
||||||
|
width = 30,
|
||||||
|
min_width = 30,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
win = {
|
||||||
|
list = {
|
||||||
|
keys = {
|
||||||
|
["S"] = "split", -- horizontal split (like NeoTree S)
|
||||||
|
["s"] = "vsplit", -- vertical split (like NeoTree s)
|
||||||
|
["t"] = "tab", -- new tab (like NeoTree t)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
|
||||||
require'snacks'.setup({
|
|
||||||
animate = { enabled = true },
|
|
||||||
bigfile = { enabled = true },
|
|
||||||
image = { enabled = true },
|
|
||||||
indent = { enabled = true },
|
|
||||||
scroll = { enabled = true },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
return {
|
|
||||||
'nvim-telescope/telescope.nvim',
|
|
||||||
tag = '0.1.8',
|
|
||||||
dependencies = {
|
|
||||||
{ 'nvim-lua/plenary.nvim', },
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require'telescope'.setup({
|
|
||||||
defaults = {
|
|
||||||
file_ignore_patterns = {
|
|
||||||
'node_modules',
|
|
||||||
'.git',
|
|
||||||
'.next',
|
|
||||||
'.cache',
|
|
||||||
'.DS_Store',
|
|
||||||
'.venv',
|
|
||||||
'.conda',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
local builtin = require'telescope.builtin'
|
|
||||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Find files' })
|
|
||||||
vim.keymap.set('n', '<leader>fg', builtin.git_files, { desc = 'Find git files' })
|
|
||||||
vim.keymap.set(
|
|
||||||
'n',
|
|
||||||
'<leader>fs',
|
|
||||||
function()
|
|
||||||
builtin.grep_string({ search = vim.fn.input('Grep > ')})
|
|
||||||
end,
|
|
||||||
{ desc = 'Find string' }
|
|
||||||
)
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,92 +1,31 @@
|
|||||||
return {
|
return {
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
branch = 'master',
|
|
||||||
lazy = false,
|
|
||||||
build = ':TSUpdate',
|
|
||||||
dependencies = {
|
|
||||||
{ 'nvim-treesitter/playground', },
|
|
||||||
{
|
{
|
||||||
'nvim-treesitter/nvim-treesitter-context',
|
"nvim-treesitter/nvim-treesitter",
|
||||||
config = function()
|
opts = function(_, opts)
|
||||||
require'treesitter-context'.setup({
|
vim.list_extend(opts.ensure_installed, {
|
||||||
enable = true,
|
"cmake",
|
||||||
multiwindow = false,
|
"cpp",
|
||||||
max_lines = 10,
|
"dockerfile",
|
||||||
min_window_height = 0,
|
"git_config",
|
||||||
line_numbers = true,
|
"git_rebase",
|
||||||
multiline_threshold = 20,
|
"gitattributes",
|
||||||
trim_scope = 'outer',
|
"gitcommit",
|
||||||
mode = 'topline',
|
"gitignore",
|
||||||
separator = nil,
|
"java",
|
||||||
zindex = 20,
|
"jsdoc",
|
||||||
on_attach = nil,
|
"jsonc",
|
||||||
|
"kotlin",
|
||||||
|
"latex",
|
||||||
|
"make",
|
||||||
|
"php",
|
||||||
|
"scala",
|
||||||
|
"sql",
|
||||||
|
"svelte",
|
||||||
|
"swift",
|
||||||
|
"toml",
|
||||||
|
"xml",
|
||||||
|
"zig",
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require'nvim-treesitter.install'.update({ with_sync = true })
|
|
||||||
require'nvim-treesitter.configs'.setup({
|
|
||||||
ensure_installed = {
|
|
||||||
'bash',
|
|
||||||
'c',
|
|
||||||
'cmake',
|
|
||||||
'cpp',
|
|
||||||
'css',
|
|
||||||
'diff',
|
|
||||||
'dockerfile',
|
|
||||||
'git_config',
|
|
||||||
'git_rebase',
|
|
||||||
'gitattributes',
|
|
||||||
'gitcommit',
|
|
||||||
'gitignore',
|
|
||||||
'html',
|
|
||||||
'java',
|
|
||||||
'javascript',
|
|
||||||
'jsdoc',
|
|
||||||
'json',
|
|
||||||
'jsonc',
|
|
||||||
'kotlin',
|
|
||||||
'latex',
|
|
||||||
'lua',
|
|
||||||
'luadoc',
|
|
||||||
'luap',
|
|
||||||
'make',
|
|
||||||
'markdown',
|
|
||||||
'markdown_inline',
|
|
||||||
'php',
|
|
||||||
'printf',
|
|
||||||
'python',
|
|
||||||
'query',
|
|
||||||
'regex',
|
|
||||||
'rust',
|
|
||||||
'scala',
|
|
||||||
'sql',
|
|
||||||
'svelte',
|
|
||||||
'swift',
|
|
||||||
'toml',
|
|
||||||
'tsx',
|
|
||||||
'typescript',
|
|
||||||
'vim',
|
|
||||||
'vimdoc',
|
|
||||||
'xml',
|
|
||||||
'yaml',
|
|
||||||
'zig'
|
|
||||||
},
|
|
||||||
sync_install = false,
|
|
||||||
auto_install = true,
|
|
||||||
indent = { enable = true },
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
disable = function(lang, buf)
|
|
||||||
local max_filesize = 500 * 1024 -- 100 KB
|
|
||||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
|
||||||
if ok and stats and stats.size > max_filesize then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
additional_vim_regex_highlighting = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
return {
|
|
||||||
'folke/trouble.nvim',
|
|
||||||
config = function()
|
|
||||||
require'trouble'.setup({
|
|
||||||
vim.api.nvim_create_user_command('Trouble', function()
|
|
||||||
require'trouble'.open()
|
|
||||||
end, { desc = "Open Trouble" }),
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
'<leader>x',
|
|
||||||
':Trouble diagnostics toggle<CR>',
|
|
||||||
mode = 'n',
|
|
||||||
silent = true,
|
|
||||||
desc = 'Toggle Trouble',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
'chomosuke/typst-preview.nvim',
|
|
||||||
lazy = false, -- or ft = 'typst'
|
|
||||||
version = '1.*',
|
|
||||||
opts = {}, -- lazy.nvim will implicitly calls `setup {}`
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
return {
|
||||||
|
-- Remove S-h/S-l buffer navigation — conflicts with desktop environment window manager
|
||||||
|
-- Buffer navigation is on C-h/l (set in keymaps.lua)
|
||||||
|
{
|
||||||
|
"akinsho/bufferline.nvim",
|
||||||
|
keys = {
|
||||||
|
{ "<S-h>", false },
|
||||||
|
{ "<S-l>", false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
return {
|
|
||||||
'mbbill/undotree',
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
'<leader>u',
|
|
||||||
':UndotreeToggle<CR>',
|
|
||||||
mode = { 'n' },
|
|
||||||
silent = true,
|
|
||||||
desc = 'Toggle undo tree',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
indent_type = "Spaces"
|
||||||
|
indent_width = 2
|
||||||
|
column_width = 80
|
||||||
Reference in New Issue
Block a user