Merge Windows 2026
This commit is contained in:
@@ -13,12 +13,10 @@ end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
require("barink.keys")
|
||||
require("lazy").setup("barink.plugins" , {
|
||||
root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed
|
||||
-- leave nil when passing the spec as the first argument to setup()
|
||||
root = vim.fn.stdpath("data") .. "/lazy",
|
||||
change_detection = {
|
||||
-- automatically check for config file changes and reload the ui
|
||||
enabled = false,
|
||||
notify = true, -- get a notification when changes are found
|
||||
notify = true,
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
8
lua/barink/plugins/AI.lua
Normal file
8
lua/barink/plugins/AI.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"nomnivore/ollama.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim"
|
||||
},
|
||||
cmd = { "Ollama", "OllamaServe", "OllamaModel", "OllamaServeStop" },
|
||||
opts = {}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ return {
|
||||
'nvim-tree/nvim-web-devicons'
|
||||
},
|
||||
config = function()
|
||||
require("oil").setup()
|
||||
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
|
||||
end
|
||||
}
|
||||
|
||||
76
lua/barink/plugins/completions.lua
Normal file
76
lua/barink/plugins/completions.lua
Normal file
@@ -0,0 +1,76 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"onsails/lspkind.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("lspkind").init({})
|
||||
vim.opt.completeopt = { "menu", "menuone", "noselect", "preview" }
|
||||
local cmp = require('cmp')
|
||||
local lspkind = require("lspkind")
|
||||
cmp.setup({
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = 'symbol',
|
||||
maxwidth = 60,
|
||||
ellipsis_char = '...',
|
||||
show_labelDetails = true,
|
||||
}),
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<C-y>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp', keyword_length = 1 },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer', keyword_length = 2 },
|
||||
}),
|
||||
window = {
|
||||
documentation = cmp.config.window.bordered()
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
-- Set configuration for specific filetype.
|
||||
cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git).
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
cmp.setup.filetype({ "sql" }, {
|
||||
sources = {
|
||||
{ name = "vim-dadbod-completion" },
|
||||
{ name = "buffer" },
|
||||
}
|
||||
})
|
||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
}),
|
||||
matching = { disallow_symbol_nonprefix_matching = false }
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
return {
|
||||
"kristijanhusak/vim-dadbod-ui",
|
||||
dependencies = {
|
||||
{'tpope/vim-dadbod', lazy = true },
|
||||
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql'}, lazy = true },
|
||||
},
|
||||
cmd = {
|
||||
'DBUI',
|
||||
'DBUIToggle',
|
||||
'DBUIAddConnection',
|
||||
'DBUIFindBuffer',
|
||||
},
|
||||
init = function ()
|
||||
vim.g.db_ui_use_nerd_fonts = 1
|
||||
end
|
||||
}
|
||||
12
lua/barink/plugins/flash.lua
Normal file
12
lua/barink/plugins/flash.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
return {
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
}
|
||||
@@ -1,16 +1,14 @@
|
||||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
branch= "harpoon2",
|
||||
branch = "harpoon2",
|
||||
dependencies = {
|
||||
{"nvim-lua/plenary.nvim"},
|
||||
{"nvim-telescope/telescope.nvim"}
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-telescope/telescope.nvim" }
|
||||
},
|
||||
config = function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon.setup()
|
||||
|
||||
vim.keymap.set("n", "ha", function() harpoon:list():add() end)
|
||||
vim.keymap.set("n", "hh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
local conf = require("telescope.config").values
|
||||
local function toggle_telescope(harpoon_files)
|
||||
local file_paths = {}
|
||||
@@ -27,15 +25,14 @@ return {
|
||||
|
||||
vim.keymap.set("n", "<leader>ha", function() harpoon:list():add() end)
|
||||
vim.keymap.set("n", "<leader>hh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
vim.keymap.set("n", "<leader>fe", function () toggle_telescope(harpoon:list()) end, { desc = "Open harpoon window"} )
|
||||
vim.keymap.set("n", "<leader>fe", function() toggle_telescope(harpoon:list()) end,
|
||||
{ desc = "Open harpoon window" })
|
||||
vim.keymap.set("n", "C-1", function() harpoon:list():select(1) end)
|
||||
vim.keymap.set("n", "C-2", function() harpoon:list():select(2) end)
|
||||
vim.keymap.set("n", "C-3", function() harpoon:list():select(3) end)
|
||||
vim.keymap.set("n", "C-4", function() harpoon:list():select(4) end)
|
||||
|
||||
|
||||
vim.keymap.set("n", "<C-,>", function() harpoon:list():prev() end)
|
||||
vim.keymap.set("n", "<C-.>", function() harpoon:list():next() end)
|
||||
|
||||
vim.keymap.set("n", "<C-Q>", function() harpoon:list():prev() end)
|
||||
vim.keymap.set("n", "<C-E>", function() harpoon:list():next() end)
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1,120 +1,23 @@
|
||||
return
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
{
|
||||
"folke/neoconf.nvim",
|
||||
opts = {}
|
||||
},
|
||||
"williamboman/mason-lspconfig",
|
||||
"williamboman/mason.nvim",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/nvim-cmp",
|
||||
{
|
||||
'L3MON4D3/LuaSnip',
|
||||
dependencies = {
|
||||
'hrsh7th/nvim-cmp',
|
||||
'rafamadriz/friendly-snippets',
|
||||
},
|
||||
version = "v2.*",
|
||||
},
|
||||
"williamboman/mason-lspconfig",
|
||||
{ 'mfussenegger/nvim-jdtls', dependencies = { 'nvim-dap' } },
|
||||
"onsails/lspkind.nvim",
|
||||
},
|
||||
config = function()
|
||||
vim.opt.completeopt = { "menu", "menuone", "noselect", "preview" }
|
||||
require("lspkind").init({})
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls", "bashls", "rust_analyzer" }
|
||||
})
|
||||
local ls = require("luasnip")
|
||||
ls.config.set_config({
|
||||
history = true,
|
||||
updateevents = "TextChanged, TextChangedI",
|
||||
enable_autosnippets = true,
|
||||
})
|
||||
local cmp = require('cmp')
|
||||
local lspkind = require("lspkind")
|
||||
cmp.setup({
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = 'symbol',
|
||||
maxwidth = 60,
|
||||
ellipsis_char = '...',
|
||||
show_labelDetails = true,
|
||||
}),
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<C-y>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp', keyword_length = 1 },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer', keyword_length = 2 },
|
||||
}),
|
||||
window = {
|
||||
documentation = cmp.config.window.bordered()
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
-- Set configuration for specific filetype.
|
||||
cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git).
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
cmp.setup.filetype({ "sql" }, {
|
||||
sources = {
|
||||
{ name = "vim-dadbod-completion" },
|
||||
{ name = "buffer" },
|
||||
}
|
||||
})
|
||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
}),
|
||||
matching = { disallow_symbol_nonprefix_matching = false }
|
||||
})
|
||||
|
||||
|
||||
vim.keymap.set({ "i", "s" }, "<C-K>", function() ls.expand() end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-n>", function() ls.jump(1) end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-p>", function() ls.jump(-1) end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-E>", function()
|
||||
if ls.choice_active() then
|
||||
ls.change_choice(1)
|
||||
end
|
||||
end, { silent = true })
|
||||
|
||||
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/lua/barink/snippets" })
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
-- Set up lspconfig.
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
local lsp = require("lspconfig")
|
||||
|
||||
for _, data in ipairs(capabilities) do
|
||||
print(data)
|
||||
end
|
||||
|
||||
|
||||
local language_server = {
|
||||
asm_lsp = true,
|
||||
@@ -132,8 +35,7 @@ return
|
||||
}
|
||||
},
|
||||
clangd = {
|
||||
capabilities = capabilities,
|
||||
root_dir = require('lspconfig').util.root_pattern("compile_commands.json", "compile_flags.txt", ".git"),
|
||||
root_dir = vim.fs.root(0, { 'compile_commands.json', 'compile_flags.txt', '.git' }),
|
||||
cmd = { "clangd" },
|
||||
filetypes = { "c", "cpp", "objc", "objcpp" },
|
||||
settings = {
|
||||
@@ -146,24 +48,19 @@ return
|
||||
gopls = true,
|
||||
intelephense = true,
|
||||
lua_ls = {
|
||||
config = {
|
||||
cmd = { "lua-language-server" },
|
||||
filetypes = { 'lua' },
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
}
|
||||
},
|
||||
diagnostics = {
|
||||
globals = { 'vim' }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
@@ -172,7 +69,8 @@ return
|
||||
config = {}
|
||||
end
|
||||
config = vim.tbl_deep_extend("force", {}, { capabilities = capabilities }, config)
|
||||
lsp[name].setup({})
|
||||
vim.lsp.config(name, config)
|
||||
vim.lsp.enable(name)
|
||||
end
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(args)
|
||||
|
||||
16
lua/barink/plugins/neovim-context.lua
Normal file
16
lua/barink/plugins/neovim-context.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
dependencies = {
|
||||
},
|
||||
config = function()
|
||||
require('treesitter-context').setup({
|
||||
enable = true,
|
||||
max_lines = 4,
|
||||
min_window_height = 0,
|
||||
line_numbers = true,
|
||||
mode = 'cursor',
|
||||
})
|
||||
end
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ return {
|
||||
'nvim-tree/nvim-web-devicons'
|
||||
},
|
||||
config = function()
|
||||
require("oil").setup()
|
||||
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
|
||||
end
|
||||
}
|
||||
|
||||
6
lua/barink/plugins/roslynLsp.lua
Normal file
6
lua/barink/plugins/roslynLsp.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"seblyng/roslyn.nvim",
|
||||
config = function()
|
||||
require("roslyn").setup()
|
||||
end,
|
||||
}
|
||||
26
lua/barink/plugins/snippets.lua
Normal file
26
lua/barink/plugins/snippets.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
return {
|
||||
'L3MON4D3/LuaSnip',
|
||||
dependencies = {
|
||||
'hrsh7th/nvim-cmp',
|
||||
'rafamadriz/friendly-snippets',
|
||||
},
|
||||
version = "v2.*",
|
||||
config = function()
|
||||
local ls = require("luasnip")
|
||||
ls.config.set_config({
|
||||
history = true,
|
||||
updateevents = "TextChanged, TextChangedI",
|
||||
enable_autosnippets = true,
|
||||
})
|
||||
vim.keymap.set({ "i", "s" }, "<C-K>", function() ls.expand() end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-n>", function() ls.jump(1) end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-p>", function() ls.jump(-1) end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-E>", function()
|
||||
if ls.choice_active() then
|
||||
ls.change_choice(1)
|
||||
end
|
||||
end, { silent = true })
|
||||
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/lua/barink/snippets" })
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end
|
||||
}
|
||||
8
lua/barink/plugins/typescriptTools.lua
Normal file
8
lua/barink/plugins/typescriptTools.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"pmizio/typescript-tools.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
opts = {}
|
||||
}
|
||||
13
lua/barink/plugins/wezterm.lua
Normal file
13
lua/barink/plugins/wezterm.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
'craigmac/nvim-navigator',
|
||||
config = function()
|
||||
require('Navigator').setup()
|
||||
|
||||
vim.keymap.set({ 'n', 't' }, '<A-h>', '<CMD>NavigatorLeft<CR>')
|
||||
vim.keymap.set({ 'n', 't' }, '<A-l>', '<CMD>NavigatorRight<CR>')
|
||||
vim.keymap.set({ 'n', 't' }, '<A-k>', '<CMD>NavigatorUp<CR>')
|
||||
vim.keymap.set({ 'n', 't' }, '<A-j>', '<CMD>NavigatorDown<CR>')
|
||||
vim.keymap.set({ 'n', 't' }, '<A-p>', '<CMD>NavigatorPrevious<CR>')
|
||||
end
|
||||
|
||||
}
|
||||
@@ -35,13 +35,3 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||
vim.g.netrw_browse_split = 0
|
||||
vim.g.netrw_winsize = 25
|
||||
|
||||
|
||||
--[[
|
||||
-- Run zig test on save
|
||||
-- TODO: fix vim.cmd call
|
||||
-- TODO: only do this when a zig test file is open
|
||||
vim.api.nvim_create_autocmd('BufWritePost' , {
|
||||
callback = function ()
|
||||
vim.cmd{cmd = '!zig' , args= {'test', vim.fn.expand('%')} }
|
||||
end
|
||||
})]] --
|
||||
|
||||
Reference in New Issue
Block a user