Compare commits
11 Commits
430a2879e9
...
a268731f19
Author | SHA1 | Date | |
---|---|---|---|
a268731f19 | |||
98dd2510c9 | |||
6825883350 | |||
0167c8dbb4 | |||
5c8aeff729 | |||
5e814303f7 | |||
0411f4b928 | |||
71f08e66aa | |||
12b89714dc | |||
6b6613aeea | |||
1bb7a56d5c |
@ -1,38 +1,35 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
||||
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"conform.nvim": { "branch": "master", "commit": "f3b930db4964d60e255c8f9e37b7f2218dfc08cb" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
|
||||
"gen.nvim": { "branch": "main", "commit": "bd19cf584b5b82123de977b44105e855e61e5f39" },
|
||||
"git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" },
|
||||
"catppuccin": { "branch": "main", "commit": "63685e1562ef53873c9764b483d7ac5c7a608922" },
|
||||
"edgy.nvim": { "branch": "main", "commit": "7e8dedc39abebe40c289b8012cc89b11c69aa7a0" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "24fa2a97085ca8a7220b5b078916f81e316036fd" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||
"mason-lspconfig": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
|
||||
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
|
||||
"nvim-dap": { "branch": "master", "commit": "abb238f631609ea4be496ba7946f4f3aaec86c6a" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" },
|
||||
"nvim-emmet": { "branch": "main", "commit": "928cfb74ed436d6d326ccab2061cf3592de1bf55" },
|
||||
"nvim-highlight-colors": { "branch": "main", "commit": "582064092cff170331064b7d198a5b97cb261fca" },
|
||||
"nvim-jdtls": { "branch": "master", "commit": "10691312d51c5485c656a71258b55d3798d3fb3e" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "38de86f82efd9ba0881203767d6a8e1815abca28" },
|
||||
"nvim-nio": { "branch": "master", "commit": "632024157d01e8bc48fd7df6a7de8ffe3fdd4f3a" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "ea2b137f35fb1e87a6471ec311805920fdf45745" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
|
||||
"oil.nvim": { "branch": "master", "commit": "2cb39e838e9dcd8b374f09a3a87a2e5ec9d372f6" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "2df52609a1632de5d77a0b2416db6ad9cf32e463" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "0fae425aaab04a5f97666bd431b96f2f19c36935" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "a8264a65a0b894832ea642844f5b7c30112c458f" },
|
||||
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "fb30422b7bee7e2fa4205a4d226f01477f4fc593" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "4f59455d2388e113bd510e85b310d15b9228ca0d" },
|
||||
"vim-tabby": { "branch": "main", "commit": "afd76df166ed0f223ede1071e0cfde8075cc4a24" }
|
||||
"lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
|
||||
"noice.nvim": { "branch": "main", "commit": "c1ba80ccf6b3bd8c7fc88fe2e61085131d44ad65" },
|
||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
||||
"nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "3497eb39bf413a57ab5b7e7e2e192683e462148c" },
|
||||
"nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" },
|
||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "140f534ce9c02189921b80f5c8a68ab9e3f92ce8" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1e5a2a796a88b5d696acb07dd5c285b13d13da21" },
|
||||
"oil.nvim": { "branch": "master", "commit": "1360be5fda9c67338331abfcd80de2afbb395bcd" },
|
||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "cb3f98d935842836cc115e8c9e4b38c1380fbb6b" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
|
||||
"twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" },
|
||||
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
|
||||
"vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
|
||||
"vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "f29c85ab42861c6ef683289b0c6a51e0d436dcf6" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "29b292bdc58b76a6c8f294c961a8bf92c5a6ebd6" }
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
local dap = require("dap")
|
||||
print("You opened a Golang file")
|
||||
|
||||
dap.adapters.delve = {
|
||||
type = 'server',
|
||||
port = '${port}',
|
||||
executable = {
|
||||
command = 'dlv',
|
||||
args = {'dap', '-l', '127.0.0.1:${port}'},
|
||||
}
|
||||
}
|
||||
|
||||
-- https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_dap.md
|
||||
dap.configurations.go = {
|
||||
{
|
||||
type = "delve",
|
||||
name = "Debug",
|
||||
request = "launch",
|
||||
program = "${file}"
|
||||
},
|
||||
{
|
||||
type = "delve",
|
||||
name = "Debug test", -- configuration for debugging test files
|
||||
request = "launch",
|
||||
mode = "test",
|
||||
program = "${file}"
|
||||
},
|
||||
-- works with go.mod packages and sub packages
|
||||
{
|
||||
type = "delve",
|
||||
name = "Debug test (go.mod)",
|
||||
request = "launch",
|
||||
mode = "test",
|
||||
program = "./${relativeFileDirname}"
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
--[[
|
||||
-- Only setup for windows
|
||||
-- Don't know if all this is actually necessary
|
||||
-- TODO: FIX: Clean this mess up ~ 03/28/2024
|
||||
--]]
|
||||
if vim.loop.os_uname().sysname == 'Windows_NT' then
|
||||
Cmd = 'c:/Users/nigel/Appdata/Local/nvim-data/mason/bin/jdtls.cmd'
|
||||
JavaDebug = vim.fn.glob("C:/Users/nigel/AppData/Local/nvim-data/java-debug/com.microsoft.java.debug.plugin/target/com.microsoft.java.debug.plugin-0.52.0.jar", 1)
|
||||
else
|
||||
Cmd = ''
|
||||
JavaDebug = nil
|
||||
end
|
||||
local config = {
|
||||
cmd = {Cmd},
|
||||
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
||||
init_options = {
|
||||
bundles = {
|
||||
JavaDebug
|
||||
}
|
||||
}
|
||||
}
|
||||
require('jdtls').start_or_attach(config)
|
||||
require('jdtls').setup_dap({hotcodreplace='auto'})
|
||||
require('jdtls.dap').setup_dap_main_class_configs()
|
@ -1 +0,0 @@
|
||||
print("You opened a LUA file..")
|
@ -1,6 +1,5 @@
|
||||
require("barink.vim")
|
||||
require("barink.keys")
|
||||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
|
@ -1,16 +1,16 @@
|
||||
-- Keymaps
|
||||
vim.g.mapleader = " "
|
||||
|
||||
vim.keymap.set("n", "<leader><F8>", vim.cmd.UndotreeToggle)
|
||||
vim.keymap.set("n", "<leader>p", [["_dP]])
|
||||
vim.keymap.set("n", "<leader>fa", vim.lsp.buf.format)
|
||||
vim.keymap.set("n", "<leader>m", ":Mason<CR>")
|
||||
vim.keymap.set("n", "<leader>e", ":Explore<CR>", { noremap = false, silent = true })
|
||||
vim.keymap.set("n", "<leader>le", ":Lexplore<CR>", { noremap = false, silent = true })
|
||||
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true })
|
||||
vim.keymap.set('n', '<leader><F8>', vim.cmd.UndotreeToggle)
|
||||
vim.keymap.set('n', '<leader>p', [["_dP]])
|
||||
vim.keymap.set('n', '<leader>fa', vim.lsp.buf.format)
|
||||
vim.keymap.set('n', '<leader>m', ":Mason<CR>")
|
||||
vim.keymap.set('n', '<leader>e',':Explore<CR>', {noremap = false, silent=true})
|
||||
vim.keymap.set('n', '<leader>le',':Lexplore<CR>', {noremap = false, silent=true})
|
||||
vim.keymap.set('n', '<leader>l', ':Neotree<CR>', {noremap = false, silent= true})
|
||||
-- Move lines while in visual mode
|
||||
vim.keymap.set("v", "<A-S-j>", ":m '>+1<CR>gv=gv", { noremap = true })
|
||||
vim.keymap.set("v", "<A-S-k>", ":m '<-2<CR>gv=gv", { noremap = true })
|
||||
vim.keymap.set('v', '<A-S-j>', ':m \'>+1<CR>gv=gv', {noremap = true})
|
||||
vim.keymap.set('v', '<A-S-k>', ':m \'<-2<CR>gv=gv', {noremap = true})
|
||||
|
||||
-- Move lines while in normal mode
|
||||
vim.keymap.set("n", "<A-S-j>", ":m .+1<CR>==", { noremap = true })
|
||||
@ -21,18 +21,11 @@ vim.keymap.set("i", "<A-j>", ":m .+1<CR>==gi", { noremap = true })
|
||||
vim.keymap.set("i", "<A-k>", ":m .-2<CR>==gi", { noremap = true })
|
||||
|
||||
-- Diagnostics !
|
||||
vim.keymap.set("n", "<C-T>", function()
|
||||
require("trouble").toggle()
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>d", function()
|
||||
vim.diagnostic.open_float()
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>dn", function()
|
||||
vim.diagnostic.goto_next()
|
||||
end)
|
||||
vim.keymap.set("n", "<leader>dp", function()
|
||||
vim.diagnostic.goto_prev()
|
||||
end)
|
||||
vim.keymap.set('n', '<C-T>', function() require('trouble').toggle() end )
|
||||
vim.keymap.set('n', '<leader>d', function () vim.diagnostic.open_float() end )
|
||||
vim.keymap.set('n', '<leader>dn', function () vim.diagnostic.goto_next() end )
|
||||
vim.keymap.set('n', '<leader>dp', function () vim.diagnostic.goto_prev() end )
|
||||
vim.keymap.set('n', '<C-d>', function () vim.lsp.buf.code_action() end)
|
||||
|
||||
-- Debugging
|
||||
vim.keymap.set("n", "<leader>sb", function()
|
||||
|
14
lua/barink/plugins/Oil.lua
Normal file
14
lua/barink/plugins/Oil.lua
Normal file
@ -0,0 +1,14 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/oil.nvim",
|
||||
opt = {
|
||||
default_file_explorer = false
|
||||
},
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons'
|
||||
},
|
||||
config = function ()
|
||||
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc= "Open parent directory"})
|
||||
end
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
return {
|
||||
{
|
||||
'David-kunz/gen.nvim',
|
||||
opts = {
|
||||
model = "codellama:7b",
|
||||
host = "localhost",
|
||||
port = "11434",
|
||||
quit_mape = "q",
|
||||
init = function (options) pcall(io.popen("ollama serve > /dev/null 2>&1 &)")) end,
|
||||
display_mode = "split",
|
||||
command =function (options)
|
||||
local body = {model = options.model, stream=true}
|
||||
return "curl --silent --no-buffer -X POST http://" .. options.host .. ':' .. options.port .. "/api/chat -d $body"
|
||||
end,
|
||||
},
|
||||
}
|
||||
}
|
@ -1,11 +1,9 @@
|
||||
return {
|
||||
'numToStr/Comment.nvim',
|
||||
lazy = false,
|
||||
opts = {
|
||||
-- add any options here
|
||||
},
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end,
|
||||
lazy = false,
|
||||
end
|
||||
}
|
||||
|
||||
|
@ -1,18 +1,35 @@
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
opts = {},
|
||||
config = function()
|
||||
require("conform").setup({
|
||||
event = { "BufWritePre"},
|
||||
cmd = { "ConformInfo"},
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
php = { "pint"},
|
||||
lua = { "stylua"},
|
||||
javascript = { { "prettierd", "prettier" } },
|
||||
javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
typescript = { "prettierd", "prettier", stop_after_first = true },
|
||||
},
|
||||
})
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
pattern = "*",
|
||||
callback = function(args)
|
||||
require("conform").format({ buffer = args.buf })
|
||||
end,
|
||||
})
|
||||
end,
|
||||
format_on_save = { timeout_ms = 500 },
|
||||
default_format_ops = {
|
||||
lsp_format = "fallback"
|
||||
},
|
||||
},
|
||||
config = function ()
|
||||
require("conform").setup()
|
||||
-- Command to run async formatting
|
||||
vim.api.nvim_create_user_command("Format", function(args)
|
||||
local range = nil
|
||||
if args.count ~= -1 then
|
||||
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
|
||||
range = {
|
||||
start = { args.line1, 0 },
|
||||
["end"] = { args.line2, end_line:len() },
|
||||
}
|
||||
end
|
||||
require("conform").format({ async = true, lsp_format = "fallback", range = range })
|
||||
end, { range = true })
|
||||
|
||||
|
||||
end
|
||||
}
|
||||
|
||||
|
16
lua/barink/plugins/dadbod-ui.lua
Normal file
16
lua/barink/plugins/dadbod-ui.lua
Normal file
@ -0,0 +1,16 @@
|
||||
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
|
||||
}
|
@ -22,12 +22,51 @@ return {
|
||||
},
|
||||
config = function ()
|
||||
local dap = require('dap')
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
name = "Launch",
|
||||
type= "codelldb",
|
||||
request = "launch",
|
||||
program = function ()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() , 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}/Framework',
|
||||
stopOnEntry = false,
|
||||
}
|
||||
}
|
||||
dap.adapters.lldb = {
|
||||
type = 'executable',
|
||||
command = "C:\\Program Files\\LLVM\\bin\\lldb-dap.exe",
|
||||
name = 'lldb'
|
||||
}
|
||||
|
||||
-- Zig configuration
|
||||
dap.configurations.zig = {
|
||||
name = 'launch',
|
||||
type= 'lldb',
|
||||
request = 'launch',
|
||||
program = '${workspaceFolder}/zig-out/bin/tests.exe',
|
||||
cwd = '${workspaceFolder}',
|
||||
}
|
||||
-- Java configuration
|
||||
-- See also ftplugin
|
||||
dap.configurations.java = {
|
||||
{
|
||||
type = 'java';
|
||||
request = 'launch';
|
||||
name = "Launch file";
|
||||
program = "java ${file}";
|
||||
type = 'java',
|
||||
request = 'launch',
|
||||
name = "Launch file",
|
||||
program = "java ${file}",
|
||||
}}
|
||||
dap.configurations.cpp = {{
|
||||
name="launch",
|
||||
type="lldb",
|
||||
request="launch",
|
||||
program = function ()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() ..'/', 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = false,
|
||||
args = {},
|
||||
}}
|
||||
dap.configurations.go = {
|
||||
{
|
||||
@ -60,6 +99,14 @@ return {
|
||||
args = {'dap', '-l', '127.0.0.1:${port}'},
|
||||
}
|
||||
}
|
||||
dap.adapters.codelldb = {
|
||||
type= 'server',
|
||||
port = '${port}',
|
||||
executable = {
|
||||
command = 'C:/Users/Nigel/Appdata/Local/nvim-data/mason/bin/codelldb.cmd',
|
||||
args = {"--port", "${port}"}
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
}
|
||||
|
29
lua/barink/plugins/edgy.lua
Normal file
29
lua/barink/plugins/edgy.lua
Normal file
@ -0,0 +1,29 @@
|
||||
return {
|
||||
"folke/edgy.nvim",
|
||||
event = "VeryLazy",
|
||||
opts= {
|
||||
bottom ={
|
||||
{
|
||||
ft = "toggleterm",
|
||||
size = { height = 0.4 },
|
||||
filter = function (_, win)
|
||||
return vim.api.nvim_win_get_config(win).relative == ""
|
||||
end,
|
||||
},
|
||||
{
|
||||
ft = "lazyterm",
|
||||
title = "Lazyterm",
|
||||
size = { height = 0.4 },
|
||||
filter = function(buf, _)
|
||||
return not vim.b[buf].lazyterm_cmd
|
||||
end
|
||||
}
|
||||
},
|
||||
init = function ()
|
||||
vim.opt.laststatus = 3
|
||||
vim.opt.splitkeep = "screen"
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
return {
|
||||
"j-hui/fidget.nvim",
|
||||
opts = {
|
||||
notification = {
|
||||
window = { winblend = 0},
|
||||
},
|
||||
},
|
||||
}
|
@ -1,10 +1,14 @@
|
||||
return {
|
||||
{
|
||||
'ThePrimeagen/git-worktree.nvim',
|
||||
dependencies = {
|
||||
'nvim-telescope/telescope.nvim'
|
||||
'nvim-telescope/telescope.nvim',
|
||||
},
|
||||
opts = {},
|
||||
init = function ()
|
||||
require("git-worktree").setup()
|
||||
require("telescope").load_extension("git_worktree")
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
|
4
lua/barink/plugins/gitsigns.lua
Normal file
4
lua/barink/plugins/gitsigns.lua
Normal file
@ -0,0 +1,4 @@
|
||||
return {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opt = {}
|
||||
}
|
@ -1,6 +1,11 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
return
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
{
|
||||
"folke/neoconf.nvim",
|
||||
opts = {}
|
||||
},
|
||||
"williamboman/mason-lspconfig",
|
||||
"williamboman/mason.nvim",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
@ -9,48 +14,41 @@ return {
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/nvim-cmp",
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = "hrsh7th/nvim-cmp",
|
||||
'L3MON4D3/LuaSnip',
|
||||
dependencies = 'hrsh7th/nvim-cmp',
|
||||
version = "v2.*",
|
||||
},
|
||||
{ "mfussenegger/nvim-jdtls", dependencies = { "nvim-dap" } },
|
||||
{
|
||||
"olrtg/nvim-emmet",
|
||||
config = function()
|
||||
vim.keymap.set({ "n", "v" }, "<leader>xe", require("nvim-emmet").wrap_with_abbreviation)
|
||||
end,
|
||||
},
|
||||
{'mfussenegger/nvim-jdtls', dependencies = {'nvim-dap'}},
|
||||
},
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls", "bashls", "rust_analyzer" },
|
||||
ensure_installed = { "lua_ls", "bashls", "rust_analyzer" }
|
||||
})
|
||||
local cmp = require("cmp")
|
||||
local cmp = require('cmp')
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
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(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" },
|
||||
{ name = "nvim_lsp", keyword_length = 1 },
|
||||
{ name = "luasnip", option = { show_autosnippets = true } },
|
||||
{ name = 'nvim_lsp', keyword_length = 1 },
|
||||
{ name = 'luasnip', option = { show_autosnippets = true}},
|
||||
{ name = 'path' },
|
||||
}, {
|
||||
{ name = "buffer", keyword_length = 2 },
|
||||
{ name = 'buffer', keyword_length = 2 },
|
||||
}),
|
||||
window = {
|
||||
documentation = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered()
|
||||
},
|
||||
})
|
||||
|
||||
-- Set configuration for specific filetype.
|
||||
cmp.setup.filetype("gitcommit", {
|
||||
@ -82,7 +80,12 @@ return {
|
||||
|
||||
local lsp = require("lspconfig")
|
||||
|
||||
lsp.emmet_language_server.setup({})
|
||||
local ls = require("luasnip")
|
||||
ls.config.set_config({
|
||||
history = true,
|
||||
updateevents = "TextChanged, TextChangedI",
|
||||
enable_autosnippets = true,
|
||||
})
|
||||
|
||||
lsp.lua_ls.setup({
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
||||
@ -101,51 +104,82 @@ return {
|
||||
enable_autosnippets = true,
|
||||
})
|
||||
|
||||
vim.keymap.set({ "i", "s" }, "<C-K>", function()
|
||||
ls.expand()
|
||||
end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-L>", function()
|
||||
ls.jump(1)
|
||||
end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-J>", 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_lua").load({ paths = "C:\\Users\\nigel\\AppData\\Local\\nvim\\lua\\snippets" })
|
||||
|
||||
-- Set up lspconfig.
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
local lsp = require("lspconfig")
|
||||
|
||||
require("lspconfig")["asm_lsp"].setup({
|
||||
local language_server = {
|
||||
asm_lsp= true,
|
||||
zls = true,
|
||||
emmet_language_server = true,
|
||||
rust_analyzer = true,
|
||||
jdtls = true,
|
||||
pylsp = true,
|
||||
phpactor = {
|
||||
init_options = {
|
||||
["language_server_phpstan.enabled"] = false,
|
||||
["language_server_psalm.enabled"] = false,
|
||||
}
|
||||
},
|
||||
clangd = {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
root_dir = require('lspconfig').util.root_pattern("compile_commands.json", "compile_flags.txt", ".git"),
|
||||
cmd = {"clangd"},
|
||||
filetypes = { "c", "cpp", "objc", "objcpp"},
|
||||
settings = {
|
||||
clangd = {
|
||||
compilationDatabasePath = "compile-commands.json",
|
||||
},
|
||||
}
|
||||
},
|
||||
ts_ls = true,
|
||||
gopls = true,
|
||||
intelephense = true,
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim'}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
require("lspconfig")["zls"].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
for name, config in pairs(language_server) do
|
||||
if config == true then
|
||||
config = {}
|
||||
end
|
||||
config = vim.tbl_deep_extend("force", {}, { capabilities = capabilities }, config)
|
||||
lsp[name].setup({})
|
||||
end
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function (args)
|
||||
local client = assert(vim.lsp.get_client_by_id(args.data.client_id), "must have valid client")
|
||||
|
||||
require("lspconfig")["rust_analyzer"].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
local settings = language_server[client.name]
|
||||
if type(settings) ~= "table" then
|
||||
settings = {}
|
||||
end
|
||||
|
||||
require("lspconfig")["jdtls"].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
local builtin = require "telescope.builtin"
|
||||
|
||||
require("lspconfig")["bashls"].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
vim.opt_local.omnifunc = "v:lua.vim.lsp.omnifunc"
|
||||
vim.keymap.set("n", "gd", builtin.lsp_definitions, {buffer = -1})
|
||||
vim.keymap.set("n", "gr", builtin.lsp_references, {buffer = -1})
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, {buffer = -1})
|
||||
vim.keymap.set("n", "gT", vim.lsp.buf.type_definition, {buffer = -1})
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {buffer = -1})
|
||||
|
||||
require("lspconfig")["tsserver"].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
require("lspconfig")["gopls"].setup({
|
||||
capabilities = capabilities,
|
||||
vim.keymap.set("n", "<LEADER>cr", vim.lsp.buf.rename, {buffer =-1})
|
||||
vim.keymap.set("n", "<LEADER>ca", vim.lsp.buf.code_action, {buffer = -1})
|
||||
vim.keymap.set("n", "<LEADER>wd", builtin.lsp_document_symbols, {buffer = -1})
|
||||
|
||||
|
||||
end
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
9
lua/barink/plugins/neo-tree.lua
Normal file
9
lua/barink/plugins/neo-tree.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim"
|
||||
},
|
||||
}
|
11
lua/barink/plugins/noice.lua
Normal file
11
lua/barink/plugins/noice.lua
Normal file
@ -0,0 +1,11 @@
|
||||
return {
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
},
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"rcarriga/nvim-notify",
|
||||
},
|
||||
|
||||
}
|
@ -1,14 +1,14 @@
|
||||
return {
|
||||
'stevearc/oil.nvim',
|
||||
opts = {},
|
||||
dependencies = {"nvim-tree/nvim-web-devicons"},
|
||||
config = function ()
|
||||
require("oil").setup(
|
||||
{
|
||||
"stevearc/oil.nvim",
|
||||
opt = {
|
||||
default_file_explorer = false
|
||||
}
|
||||
)
|
||||
},
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons'
|
||||
},
|
||||
config = function ()
|
||||
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc= "Open parent directory"})
|
||||
|
||||
end
|
||||
}
|
||||
}
|
||||
|
@ -6,15 +6,7 @@ return {
|
||||
{'nvim-lua/plenary.nvim'},
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
build = function () if os == 'Windows_NT' then
|
||||
print("You are on Windows, Idiot!!!")
|
||||
return [[
|
||||
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
|
||||
&& cmake --build build --config Release
|
||||
&& cmake --install build --prefix build
|
||||
]] else
|
||||
return 'make' end
|
||||
end,
|
||||
build ="cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build",
|
||||
}
|
||||
},
|
||||
config = function()
|
||||
@ -22,8 +14,15 @@ return {
|
||||
require('telescope').load_extension('fzf')
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>fs', builtin.git_files, {})
|
||||
vim.keymap.set('n', '<leader>fd', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>ft', builtin.git_files, {})
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags)
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers)
|
||||
vim.keymap.set('n', '<leader>/', builtin.current_buffer_fuzzy_find)
|
||||
vim.keymap.set('n', '<leader>gw', builtin.grep_string)
|
||||
vim.keymap.set('n', '<leader>fp',function ()
|
||||
builtin.find_files { cwd = "~/AppData/Local/nvim/lua/barink/"}
|
||||
end)
|
||||
end
|
||||
}
|
||||
}
|
||||
|
30
lua/barink/plugins/theme.lua
Normal file
30
lua/barink/plugins/theme.lua
Normal file
@ -0,0 +1,30 @@
|
||||
-- return {
|
||||
-- "folke/tokyonight.nvim",
|
||||
-- lazy = false,
|
||||
-- priority = 1000,
|
||||
-- opts = {},
|
||||
-- config = function()
|
||||
-- require("tokyonight").setup({
|
||||
-- style = "night",
|
||||
-- light_style = "day",
|
||||
-- transparent = true,
|
||||
-- terminal_colors = true,
|
||||
-- dim_inactive = false,
|
||||
-- lualine_bold = false,
|
||||
-- })
|
||||
--
|
||||
-- vim.cmd [[colorscheme tokyonight]]
|
||||
-- end
|
||||
-- }
|
||||
|
||||
return {
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name="catppuccin",
|
||||
priority=1000,
|
||||
config = function ()
|
||||
require("catppuccin").setup()
|
||||
vim.cmd.colorscheme('catppuccin')
|
||||
end
|
||||
}
|
||||
}
|
8
lua/barink/plugins/todo-comments.lua
Normal file
8
lua/barink/plugins/todo-comments.lua
Normal file
@ -0,0 +1,8 @@
|
||||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim"
|
||||
},
|
||||
opts = {
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
return {
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {},
|
||||
config = function()
|
||||
require("tokyonight").setup({
|
||||
style = "night",
|
||||
light_style = "day",
|
||||
transparent = true,
|
||||
terminal_colors = true,
|
||||
dim_inactive = false,
|
||||
lualine_bold = false,
|
||||
})
|
||||
|
||||
vim.cmd [[colorscheme tokyonight]]
|
||||
end
|
||||
}
|
@ -1,14 +1,33 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-treesitter/playground",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require 'nvim-treesitter.install'.compilers = {'clang'}
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "bash" },
|
||||
playground = {
|
||||
enable = true,
|
||||
disable = {},
|
||||
updatetime = 25,
|
||||
keybindings = {
|
||||
toggle_query_editor = 'o',
|
||||
toggle_hl_groups = 'i',
|
||||
update = 'R',
|
||||
show_help = '?'
|
||||
}
|
||||
},
|
||||
ensure_installed = { "python", "c", "lua", "vim", "vimdoc", "bash" },
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end
|
||||
},
|
||||
}
|
||||
|
6
lua/barink/plugins/twilight.lua
Normal file
6
lua/barink/plugins/twilight.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
{
|
||||
"folke/twilight.nvim",
|
||||
opts = {}
|
||||
}
|
||||
}
|
@ -1 +1,6 @@
|
||||
return { "mbbill/undotree" }
|
||||
return {
|
||||
"mbbill/undotree",
|
||||
config = function ()
|
||||
vim.keymap.set('n', '<leader><f1>', vim.cmd.UndotreeToggle)
|
||||
end
|
||||
}
|
||||
|
@ -1,4 +1,9 @@
|
||||
return {
|
||||
<<<<<<< HEAD
|
||||
'tpope/vim-dadbod',
|
||||
}
|
||||
|
||||
=======
|
||||
"tpope/vim-dadbod",
|
||||
}
|
||||
>>>>>>> Windows
|
||||
|
4
lua/barink/plugins/vimbegood.lua
Normal file
4
lua/barink/plugins/vimbegood.lua
Normal file
@ -0,0 +1,4 @@
|
||||
return {
|
||||
'ThePrimeagen/vim-be-good',
|
||||
}
|
||||
|
15
lua/barink/plugins/which-key.lua
Normal file
15
lua/barink/plugins/which-key.lua
Normal file
@ -0,0 +1,15 @@
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({global = false})
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
}
|
||||
}
|
||||
}
|
4
lua/barink/plugins/zen-mode.lua
Normal file
4
lua/barink/plugins/zen-mode.lua
Normal file
@ -0,0 +1,4 @@
|
||||
return {
|
||||
"folke/zen-mode.nvim",
|
||||
opts = {}
|
||||
}
|
@ -35,3 +35,15 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||
end,
|
||||
})
|
||||
|
||||
--[[
|
||||
-- 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
|
||||
})]]--
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user