Nvim: add new plugins
This commit is contained in:
17
.config/nvim/lua/plugins/bigfile.lua
Normal file
17
.config/nvim/lua/plugins/bigfile.lua
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
return {
|
||||||
|
"LunarVim/bigfile.nvim",
|
||||||
|
opts = {
|
||||||
|
filesize = 2, -- size of the file in MiB, the plugin round file sizes to the closest MiB
|
||||||
|
pattern = { "*" }, -- autocmd pattern or function see <### Overriding the detection of big files>
|
||||||
|
features = { -- features to disable
|
||||||
|
"indent_blankline",
|
||||||
|
"illuminate",
|
||||||
|
"lsp",
|
||||||
|
"treesitter",
|
||||||
|
"syntax",
|
||||||
|
"matchparen",
|
||||||
|
"vimopts",
|
||||||
|
"filetype",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
37
.config/nvim/lua/plugins/cd-project.lua
Normal file
37
.config/nvim/lua/plugins/cd-project.lua
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
return {
|
||||||
|
'LintaoAmons/cd-project.nvim',
|
||||||
|
opts = {
|
||||||
|
-- this json file is acting like a database to update and read the projects in real time.
|
||||||
|
-- So because it's just a json file, you can edit directly to add more paths you want manually
|
||||||
|
projects_config_filepath = vim.fs.normalize(vim.fn.stdpath("config") .. "/cd-project.nvim.json"),
|
||||||
|
-- this controls the behaviour of `CdProjectAdd` command about how to get the project directory
|
||||||
|
project_dir_pattern = { ".git", ".gitignore", "Cargo.toml", "package.json", "go.mod" },
|
||||||
|
choice_format = "both", -- optional, you can switch to "name" or "path"
|
||||||
|
projects_picker = "vim-ui", -- optional, you can switch to `telescope`
|
||||||
|
-- do whatever you like by hooks
|
||||||
|
hooks = {
|
||||||
|
{
|
||||||
|
callback = function(dir)
|
||||||
|
vim.notify("switched to dir: " .. dir)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
callback = function(_)
|
||||||
|
vim.cmd("Telescope find_files")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
callback = function(dir)
|
||||||
|
vim.notify("switched to dir: " .. dir)
|
||||||
|
end, -- required, action when trigger the hook
|
||||||
|
name = "cd hint", -- optional
|
||||||
|
order = 1, -- optional, the execution order if there're multiple hooks to be trigger at one point
|
||||||
|
pattern = "cd-project.nvim", -- optional, trigger hook if contains pattern
|
||||||
|
trigger_point = "DISABLE", -- optional, enum of trigger_points, default to `AFTER_CD`
|
||||||
|
match_rule = function(dir) -- optional, a function return bool. if have this fields, then pattern will be ignored
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
17
.config/nvim/lua/plugins/chatgpt.lua
Normal file
17
.config/nvim/lua/plugins/chatgpt.lua
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
return {
|
||||||
|
"jackMort/ChatGPT.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = function()
|
||||||
|
require("chatgpt").setup({
|
||||||
|
|
||||||
|
--api_key_cmd = "op read op://private/OpenAI/credential --no-newline"
|
||||||
|
api_key = "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"
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-telescope/telescope.nvim"
|
||||||
|
},
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
24
.config/nvim/lua/plugins/column.lua
Normal file
24
.config/nvim/lua/plugins/column.lua
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
return {
|
||||||
|
'Bekaboo/deadcolumn.nvim',
|
||||||
|
opts = {
|
||||||
|
scope = 'buffer',
|
||||||
|
---@type string[]|fun(mode: string): boolean
|
||||||
|
modes = function() return true end,
|
||||||
|
blending = {
|
||||||
|
threshold = 0.4,
|
||||||
|
colorcode = '#000000',
|
||||||
|
hlgroup = { 'Normal', 'bg' },
|
||||||
|
},
|
||||||
|
warning = {
|
||||||
|
alpha = 0.3,
|
||||||
|
offset = 0,
|
||||||
|
colorcode = '#CC0000',
|
||||||
|
hlgroup = { 'Error', 'bg' },
|
||||||
|
},
|
||||||
|
extra = {
|
||||||
|
---@type string?
|
||||||
|
follow_tw = nil,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
6
.config/nvim/lua/plugins/digraphs.lua
Normal file
6
.config/nvim/lua/plugins/digraphs.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
'protex/better-digraphs.nvim',
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set('i', '<C-k>d', '<cmd>lua require("better-digraphs").digraphs("i")<cr>', { noremap = true, silent = true})
|
||||||
|
end
|
||||||
|
}
|
||||||
7
.config/nvim/lua/plugins/focus.lua
Normal file
7
.config/nvim/lua/plugins/focus.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {{
|
||||||
|
"Pocco81/true-zen.nvim",
|
||||||
|
--"junegunn/goyo.vim",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nullchilly/fsread.nvim",
|
||||||
|
}}
|
||||||
3
.config/nvim/lua/plugins/fugitive.lua
Normal file
3
.config/nvim/lua/plugins/fugitive.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
"tpope/vim-fugitive",
|
||||||
|
}
|
||||||
23
.config/nvim/lua/plugins/gen.lua
Normal file
23
.config/nvim/lua/plugins/gen.lua
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
return {
|
||||||
|
"David-Kunz/gen.nvim",
|
||||||
|
opts = {
|
||||||
|
model = "mistral", -- The default model to use.
|
||||||
|
host = "localhost", -- The host running the Ollama service.
|
||||||
|
port = "11434", -- The port on which the Ollama service is listening.
|
||||||
|
display_mode = "split", -- The display mode. Can be "float" or "split".
|
||||||
|
show_prompt = true, -- Shows the Prompt submitted to Ollama.
|
||||||
|
show_model = true, -- Displays which model you are using at the beginning of your chat session.
|
||||||
|
no_auto_close = false, -- Never closes the window automatically.
|
||||||
|
init = function(options) pcall(io.popen, "ollama serve > /dev/null 2>&1 &") end,
|
||||||
|
-- Function to initialize Ollama
|
||||||
|
command = function(options)
|
||||||
|
return "curl --silent --no-buffer -X POST http://" .. options.host .. ":" .. options.port .. "/api/generate -d $body"
|
||||||
|
end,
|
||||||
|
-- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped).
|
||||||
|
-- This can also be a command string.
|
||||||
|
-- The executed command must return a JSON object with { response, context }
|
||||||
|
-- (context property is optional).
|
||||||
|
-- list_models = '<omitted lua function>', -- Retrieves a list of model names
|
||||||
|
debug = false -- Prints errors and the command which is run.
|
||||||
|
}
|
||||||
|
}
|
||||||
16
.config/nvim/lua/plugins/godbolt.lua
Normal file
16
.config/nvim/lua/plugins/godbolt.lua
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
return {
|
||||||
|
url = "https://git.sr.ht/~p00f/godbolt.nvim",
|
||||||
|
opts = {
|
||||||
|
languages = {
|
||||||
|
cpp = { compiler = "g122", options = {} },
|
||||||
|
c = { compiler = "cg122", options = {} },
|
||||||
|
rust = { compiler = "r1650", options = {} },
|
||||||
|
-- any_additional_filetype = { compiler = ..., options = ... },
|
||||||
|
},
|
||||||
|
quickfix = {
|
||||||
|
enable = false, -- whether to populate the quickfix list in case of errors
|
||||||
|
auto_open = false -- whether to open the quickfix list in case of errors
|
||||||
|
},
|
||||||
|
url = "https://godbolt.org" -- can be changed to a different godbolt instance
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,8 @@ return {
|
|||||||
{url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"},
|
{url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"},
|
||||||
"jubnzv/virtual-types.nvim",
|
"jubnzv/virtual-types.nvim",
|
||||||
--"ray-x/lsp_signature.nvim",
|
--"ray-x/lsp_signature.nvim",
|
||||||
"folke/neodev.nvim"
|
"folke/neodev.nvim",
|
||||||
|
"artemave/workspace-diagnostics.nvim"
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("neodev").setup({
|
require("neodev").setup({
|
||||||
@@ -135,6 +136,7 @@ return {
|
|||||||
-- })
|
-- })
|
||||||
require("clangd_extensions.inlay_hints").setup_autocmd()
|
require("clangd_extensions.inlay_hints").setup_autocmd()
|
||||||
require("clangd_extensions.inlay_hints").set_inlay_hints()
|
require("clangd_extensions.inlay_hints").set_inlay_hints()
|
||||||
|
--require("workspace-diagnostics").populate_workspace_diagnostics(ev.buf)
|
||||||
|
|
||||||
local signs = {
|
local signs = {
|
||||||
{ name = "DiagnosticSignError", text = "" },
|
{ name = "DiagnosticSignError", text = "" },
|
||||||
|
|||||||
4
.config/nvim/lua/plugins/no-neck-pain.lua
Normal file
4
.config/nvim/lua/plugins/no-neck-pain.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
"shortcuts/no-neck-pain.nvim",
|
||||||
|
config = true
|
||||||
|
}
|
||||||
12
.config/nvim/lua/plugins/notify.lua
Normal file
12
.config/nvim/lua/plugins/notify.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
return {
|
||||||
|
"rcarriga/nvim-notify",
|
||||||
|
opts = {
|
||||||
|
stages = "static",
|
||||||
|
fps = 0,
|
||||||
|
on_open = function(win)
|
||||||
|
if vim.api.nvim_win_is_valid(win) then
|
||||||
|
vim.api.nvim_win_set_config(win, { border = "single" })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
31
.config/nvim/lua/plugins/obsidian.lua
Normal file
31
.config/nvim/lua/plugins/obsidian.lua
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
return {
|
||||||
|
"epwalsh/obsidian.nvim",
|
||||||
|
version = "*", -- recommended, use latest release instead of latest commit
|
||||||
|
--lazy = true,
|
||||||
|
--ft = "markdown",
|
||||||
|
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
|
||||||
|
-- event = {
|
||||||
|
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
|
||||||
|
-- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md"
|
||||||
|
-- "BufReadPre path/to/my-vault/**.md",
|
||||||
|
-- "BufNewFile path/to/my-vault/**.md",
|
||||||
|
-- },
|
||||||
|
dependencies = {
|
||||||
|
-- Required.
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
|
||||||
|
-- see below for full list of optional dependencies 👇
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
workspaces = {
|
||||||
|
{
|
||||||
|
name = "personal",
|
||||||
|
path = "~/vaults/personal",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "work",
|
||||||
|
path = "~/vaults/work",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
8
.config/nvim/lua/plugins/startup.lua
Normal file
8
.config/nvim/lua/plugins/startup.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
'CWood-sdf/spaceport.nvim',
|
||||||
|
opts = {
|
||||||
|
|
||||||
|
},
|
||||||
|
lazy = false, -- load spaceport immediately
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
6
.config/nvim/lua/plugins/swap.lua
Normal file
6
.config/nvim/lua/plugins/swap.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
'Wansmer/sibling-swap.nvim',
|
||||||
|
config = function()
|
||||||
|
require('sibling-swap').setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
4
.config/nvim/lua/plugins/tables.lua
Normal file
4
.config/nvim/lua/plugins/tables.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
'Myzel394/easytables.nvim',
|
||||||
|
config = true,
|
||||||
|
}
|
||||||
3
.config/nvim/lua/plugins/targets.lua
Normal file
3
.config/nvim/lua/plugins/targets.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
"wellle/targets.vim",
|
||||||
|
}
|
||||||
9
.config/nvim/lua/plugins/terminal.lua
Normal file
9
.config/nvim/lua/plugins/terminal.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
'akinsho/toggleterm.nvim',
|
||||||
|
config = function()
|
||||||
|
require('toggleterm').setup({
|
||||||
|
open_mapping = [[<leader>i]],
|
||||||
|
insert_mappings = false
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
4
.config/nvim/lua/plugins/trouble.lua
Normal file
4
.config/nvim/lua/plugins/trouble.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
'artemave/workspace-diagnostics.nvim',
|
||||||
|
config = true,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user