Compare commits
17 Commits
1bb7a56d5c
...
Windows
| Author | SHA1 | Date | |
|---|---|---|---|
|
693aaa0c75
|
|||
|
1337963f72
|
|||
|
6b8298f00d
|
|||
|
9db9a8f594
|
|||
|
a6c0657d70
|
|||
|
bd1e208133
|
|||
|
52c7c5099d
|
|||
|
032d00a164
|
|||
|
98dd2510c9
|
|||
|
6825883350
|
|||
|
0167c8dbb4
|
|||
|
5c8aeff729
|
|||
|
5e814303f7
|
|||
|
0411f4b928
|
|||
|
71f08e66aa
|
|||
|
12b89714dc
|
|||
|
6b6613aeea
|
5
after/ftplugin/cpp.lua
Normal file
5
after/ftplugin/cpp.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
local tab_spacing = 2
|
||||
vim.opt.tabstop = tab_spacing
|
||||
vim.opt.softtabstop = tab_spacing
|
||||
vim.opt.shiftwidth = tab_spacing
|
||||
vim.opt_local.makeprg = 'msbuild .\\game.vcxproj /p:Configuration=Release /p:Platform=x64'
|
||||
4
after/ftplugin/php.lua
Normal file
4
after/ftplugin/php.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
vim.keymap.set("n", "<space>pa", function()
|
||||
package.loaded["php.artisan"] = nil
|
||||
require("php.artisan").telescope_select_artisan()
|
||||
end)
|
||||
10
after/plugin/colors.lua
Normal file
10
after/plugin/colors.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
function ColorMyPencils(color)
|
||||
color = color or "catppuccin"
|
||||
vim.cmd.colorscheme(color)
|
||||
|
||||
-- make transparent BG
|
||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
end
|
||||
|
||||
ColorMyPencils()
|
||||
@@ -1,36 +1,56 @@
|
||||
{
|
||||
"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" },
|
||||
"edgy.nvim": { "branch": "main", "commit": "0e8bbab4eba9dab6c237e4a2e146dc0466897be6" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "33be7ac3173c7c20b94ce7e1b9734c1a1e85f292" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||
"mason-lspconfig": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
|
||||
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" },
|
||||
"neoconf.nvim": { "branch": "main", "commit": "04060950124f5901dd383566208b591a5bdb2929" },
|
||||
"nui.nvim": { "branch": "main", "commit": "a2bc1e9d0359caa5d11ad967cd1e30e8d4676226" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
|
||||
"nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" },
|
||||
"nvim-jdtls": { "branch": "master", "commit": "40e8494e04c1bcd5dd6c0d0bc187d2d10965017d" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "9c9eb07fecc578e25e28db8dc9002b43fff2ed79" },
|
||||
"nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "09700b88b41ed96391de3d2010d74dc54fd5c210" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
|
||||
"catppuccin": { "branch": "main", "commit": "193e123cdbc4dd3e86db883d55349e9587f0ded6" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"conform.nvim": { "branch": "master", "commit": "ffe26e8df8115c9665d24231f8a49fadb2d611ce" },
|
||||
"edgy.nvim": { "branch": "main", "commit": "8bfd2808994a988c975694122f68624b8a219f5f" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" },
|
||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "3ddd1b4edefa425fda5a9f95a4f25578727c0bb3" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mason-lspconfig": { "branch": "main", "commit": "c55bd8a8fb191e24176c206a7af1dd51ce7276a5" },
|
||||
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
||||
"neoconf.nvim": { "branch": "main", "commit": "3c1b589a73f4a73fed63d017626acd2c10d0a8f8" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
|
||||
"nvim-dap": { "branch": "master", "commit": "5860c7c501eb428d3137ee22c522828d20cca0b3" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||
"nvim-jdtls": { "branch": "master", "commit": "f73731b543f5971e0da9665eb1d7ceffe1fde71f" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "a2bd1cf7b0446a7414aaf373cea5e4ca804c9c69" },
|
||||
"nvim-navigator": { "branch": "master", "commit": "3979c931a85335fed1b0755992898b49d0d54678" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "64dd4cf3f6fd0ab17622c5ce15c91fc539c3f24a" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
|
||||
"oil.nvim": { "branch": "master", "commit": "cbcb3f997f6f261c577b943ec94e4ef55108dd95" },
|
||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "61a4a615366c470a4e9ca8f8b45718b6b92af73f" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "96fee098a90e7c09c9811aa7df71d773ba8b9b53" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "30d7be361a7fbf187a881f17e574e9213d5108ea" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "88c3be40c061ce053ab326ce4fdcb973a1f785ff" },
|
||||
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "64d6cafb9dcbacce18c26d7daf617ebb96b273f3" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "7915964e73c30ba5657e9a762c6570925dad421b" }
|
||||
}
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"roslyn.nvim": { "branch": "main", "commit": "1ebc9393d3e577d9f68102f14d98b2e4e7f15644" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "e69b434b968a33815e2f02a5c7bd7b8dd4c7d4b2" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"twilight.nvim": { "branch": "main", "commit": "664e752f4a219801265cc3fc18782b457b58c1e1" },
|
||||
"typescript-tools.nvim": { "branch": "master", "commit": "c2f5910074103705661e9651aa841e0d7eea9932" },
|
||||
"undotree": { "branch": "master", "commit": "0f1c9816975b5d7f87d5003a19c53c6fd2ff6f7f" },
|
||||
"vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" },
|
||||
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "48c4f271da13d380592f4907e2d1d5558044e4e5" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||
"yazi.nvim": { "branch": "main", "commit": "3bd585a908d7555d9d08ca1bfe5cc2c70e13d8b1" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "8564ce6d29ec7554eb9df578efa882d33b3c23a7" }
|
||||
}
|
||||
|
||||
@@ -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,14 +0,0 @@
|
||||
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)
|
||||
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,10 +0,0 @@
|
||||
function ColorMyPencils(color)
|
||||
color = color or "tokyonight"
|
||||
vim.cmd.colorscheme(color)
|
||||
|
||||
-- make transparent BG
|
||||
vim.api.nvim_set_hl(0, "Normal", {bg = "none"})
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none"})
|
||||
end
|
||||
|
||||
ColorMyPencils()
|
||||
@@ -1,6 +1,4 @@
|
||||
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({
|
||||
@@ -13,5 +11,12 @@ if not vim.loop.fs_stat(lazypath) then
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
require("barink.keys")
|
||||
require("lazy").setup("barink.plugins" , {
|
||||
root = vim.fn.stdpath("data") .. "/lazy",
|
||||
change_detection = {
|
||||
enabled = false,
|
||||
notify = true,
|
||||
},
|
||||
|
||||
require("lazy").setup("barink.plugins")
|
||||
})
|
||||
|
||||
@@ -5,32 +5,70 @@ 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('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 })
|
||||
|
||||
-- Move lines while in normal mode
|
||||
vim.keymap.set('n', '<A-S-j>', ':m .+1<CR>==', {noremap = true})
|
||||
vim.keymap.set('n', '<A-S-k>', ':m .-2<CR>==', {noremap = true})
|
||||
-- Move lines while in normal mode
|
||||
vim.keymap.set('n', '<A-S-j>', ':m .+1<CR>==', { noremap = true })
|
||||
vim.keymap.set('n', '<A-S-k>', ':m .-2<CR>==', { noremap = true })
|
||||
|
||||
-- Move line in edit mode
|
||||
vim.keymap.set('i', '<A-j>', ':m .+1<CR>==gi', {noremap = true})
|
||||
vim.keymap.set('i', '<A-k>', ':m .-2<CR>==gi', {noremap = true})
|
||||
-- Move line in edit mode
|
||||
vim.keymap.set('i', '<A-j>', ':m .+1<CR>==gi', { noremap = true })
|
||||
vim.keymap.set('i', '<A-k>', ':m .-2<CR>==gi', { noremap = true })
|
||||
|
||||
-- Simplified split navigation
|
||||
vim.keymap.set('n', '<C-h>', '<C-w><C-h>')
|
||||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>')
|
||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>')
|
||||
vim.keymap.set('n', '<C-l>', '<C-w><C-l>')
|
||||
-- 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-d>', function () vim.lsp.buf.code_action() end)
|
||||
vim.keymap.set('n', '<C-T>', function() require('trouble').toggle('diagnostics') 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', '<leader>ca', function() vim.lsp.buf.code_action() end)
|
||||
-- Debugging
|
||||
vim.keymap.set('n', '<leader>sb', function () require('dap').toggle_breakpoint() end )
|
||||
vim.keymap.set('n', '<leader>db', function () require('dapui').toggle() end )
|
||||
vim.keymap.set('n', '<F5>', function () print("Start debug session" ) require('dap').continue() end )
|
||||
vim.keymap.set('n', '<F6>', function () require('dap').step_over() end )
|
||||
vim.keymap.set('n', '<F7>', function () require('dap').step_into() end )
|
||||
vim.keymap.set('n', '<leader>b', function() require('dap').toggle_breakpoint() end)
|
||||
vim.keymap.set('n', '<F5>', function()
|
||||
print("Start debug session")
|
||||
require('dap').continue()
|
||||
end)
|
||||
vim.keymap.set('n', '<F6>', function() require('dap').step_over() end)
|
||||
vim.keymap.set('n', '<F7>', function() require('dap').step_into() end)
|
||||
|
||||
vim.keymap.set('n', '<leader>=',":Gen Generate<CR>")
|
||||
vim.keymap.set('n', '<leader>=', ":Gen Generate<CR>")
|
||||
|
||||
-- Easily hit escape in terminal mode.
|
||||
vim.keymap.set("t", "<esc><esc>", "<c-\\><c-n>")
|
||||
|
||||
-- Open a terminal at the bottom of the screen with a fixed height.
|
||||
vim.keymap.set("n", ",st", function()
|
||||
vim.cmd.new()
|
||||
vim.cmd.wincmd "J"
|
||||
vim.api.nvim_win_set_height(0, 12)
|
||||
vim.wo.winfixheight = true
|
||||
vim.cmd.term()
|
||||
end)
|
||||
|
||||
-- Open quickfix list
|
||||
vim.keymap.set("n", "<M-k>", "<cmd>cnext<CR>zz")
|
||||
vim.keymap.set("n", "<M-j>", "<cmd>cprev<CR>zz")
|
||||
|
||||
|
||||
-- Go to next in location list
|
||||
vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
|
||||
vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
|
||||
|
||||
|
||||
-- Highlight on yank
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
desc = "Highlight when yanking text ",
|
||||
group = vim.api.nvim_create_augroup('barink', { clear = true }),
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end
|
||||
})
|
||||
|
||||
2
lua/barink/plugins/AI.lua
Normal file
2
lua/barink/plugins/AI.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
return {
|
||||
}
|
||||
15
lua/barink/plugins/Oil.lua
Normal file
15
lua/barink/plugins/Oil.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/oil.nvim",
|
||||
opt = {
|
||||
default_file_explorer = true
|
||||
},
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons'
|
||||
},
|
||||
config = function()
|
||||
require("oil").setup()
|
||||
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
|
||||
end
|
||||
}
|
||||
}
|
||||
9
lua/barink/plugins/comments.lua
Normal file
9
lua/barink/plugins/comments.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
'numToStr/Comment.nvim',
|
||||
lazy = false,
|
||||
opts = {
|
||||
},
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end
|
||||
}
|
||||
31
lua/barink/plugins/conform.lua
Normal file
31
lua/barink/plugins/conform.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
config = function()
|
||||
require("conform").setup(
|
||||
{
|
||||
formatters_by_ft = {
|
||||
php = { "pint" },
|
||||
lua = { "stylua" },
|
||||
javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
typescript = { "prettierd", "prettier", stop_after_first = true },
|
||||
java = { "clang-format", },
|
||||
cpp = { "clang-format", },
|
||||
},
|
||||
format_on_save = {
|
||||
lsp_fallback = true,
|
||||
},
|
||||
})
|
||||
-- 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,25 +22,59 @@ return {
|
||||
},
|
||||
config = function ()
|
||||
local dap = require('dap')
|
||||
-- Godot Config
|
||||
dap.adapters.godot = {
|
||||
type = "server",
|
||||
host = "127.0.0.1",
|
||||
port = 6006
|
||||
}
|
||||
--dap.configurations.gdscript{
|
||||
-- type = "godot",
|
||||
-- request = "launch",
|
||||
-- name = "launch scene",
|
||||
-- project = "${workspaceFolder}"
|
||||
--}
|
||||
-- C/C++ Config
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
name = "Launch",
|
||||
type= "codelldb",
|
||||
type= "lldb",
|
||||
request = "launch",
|
||||
program = function ()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() , 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}/Framework',
|
||||
stopOnEntry = false,
|
||||
runInTerminal = false,
|
||||
}
|
||||
}
|
||||
dap.adapters.lldb = {
|
||||
type = 'server',
|
||||
port= "${port}",
|
||||
executable = {
|
||||
command = "C:\\Users\\nigel\\AppData\\Local\\nvim-data\\mason\\bin\\codelldb.cmd",
|
||||
args = { "--port", "${port}"}
|
||||
},
|
||||
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}",
|
||||
}}
|
||||
-- Golang config
|
||||
dap.configurations.go = {
|
||||
{
|
||||
type = "delve",
|
||||
@@ -72,14 +106,20 @@ 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}"}
|
||||
}
|
||||
}
|
||||
local dap = require("dap")
|
||||
local ui = require("dapui")
|
||||
dap.listeners.before.attach.dapui_config = function()
|
||||
ui.open()
|
||||
end
|
||||
dap.listeners.before.launch.dapui_config = function()
|
||||
ui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated.dapui_config = function()
|
||||
ui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited.dapui_config = function()
|
||||
ui.close()
|
||||
end
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,29 @@
|
||||
return {
|
||||
"folke/edgy.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
init = function ()
|
||||
vim.opt.laststatus = 3
|
||||
vim.opt.splitkeep = "screen"
|
||||
end
|
||||
}
|
||||
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 +1,8 @@
|
||||
return {
|
||||
"j-hui/fidget.nvim",
|
||||
opts = {
|
||||
notification = {
|
||||
window = { winblend = 0},
|
||||
},
|
||||
},
|
||||
}
|
||||
"j-hui/fidget.nvim",
|
||||
config = function()
|
||||
local opts = {
|
||||
}
|
||||
require("fidget").setup(opts)
|
||||
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" },
|
||||
},
|
||||
}
|
||||
14
lua/barink/plugins/git-worktree.lua
Normal file
14
lua/barink/plugins/git-worktree.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
{
|
||||
'ThePrimeagen/git-worktree.nvim',
|
||||
dependencies = {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
},
|
||||
opts = {},
|
||||
init = function ()
|
||||
require("git-worktree").setup()
|
||||
require("telescope").load_extension("git_worktree")
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
29
lua/barink/plugins/gitsigns.lua
Normal file
29
lua/barink/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
return {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
config = function()
|
||||
local opts = {
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = "~" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "-" },
|
||||
changedelete = { text = "~" }
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = '+' },
|
||||
change = { text = "~" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "-" },
|
||||
changedelete = { text = "~" },
|
||||
untracked = { text = "*" },
|
||||
},
|
||||
signs_staged_enable = true,
|
||||
signcolumn = true,
|
||||
watch_gitdir = {
|
||||
follow_files = true
|
||||
},
|
||||
auto_attach = true
|
||||
}
|
||||
require("gitsigns").setup(opts)
|
||||
end,
|
||||
}
|
||||
@@ -1,22 +1,25 @@
|
||||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
branch= "harpoon2",
|
||||
dependencies = {{"nvim-lua/plenary.nvim"}},
|
||||
config = function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon.setup()
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
dependencies = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-telescope/telescope.nvim" }
|
||||
},
|
||||
config = function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon.setup()
|
||||
|
||||
vim.keymap.set("n", "<leader>a", function() harpoon:list():append() end)
|
||||
vim.keymap.set("n", "<C-h>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
|
||||
vim.keymap.set("n", "<leader>1", function() harpoon:list():select(1) end)
|
||||
vim.keymap.set("n", "<leader>2", function() harpoon:list():select(2) end)
|
||||
vim.keymap.set("n", "<leader>3", function() harpoon:list():select(3) end)
|
||||
vim.keymap.set("n", "<leader>4", function() harpoon:list():select(4) end)
|
||||
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", "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-Q>", function() harpoon:list():prev() end)
|
||||
vim.keymap.set("n", "<C-E>", function() harpoon:list():next() end)
|
||||
|
||||
end
|
||||
vim.keymap.set("n", "<C-,>", function() harpoon:list():prev() end)
|
||||
vim.keymap.set("n", "<C-.>", function() harpoon:list():next() end)
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1,164 +1,201 @@
|
||||
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',
|
||||
version = "v2.*",
|
||||
},
|
||||
{'mfussenegger/nvim-jdtls', dependencies = {'nvim-dap'}},
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
{
|
||||
"folke/neoconf.nvim",
|
||||
opts = {}
|
||||
},
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls", "bashls", "rust_analyzer" }
|
||||
})
|
||||
local cmp = require('cmp')
|
||||
cmp.setup({
|
||||
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(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
"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.*",
|
||||
},
|
||||
{ '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,
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' },
|
||||
{ name = 'nvim_lsp', keyword_length = 1 },
|
||||
{ name = 'luasnip', option = { show_autosnippets = true}},
|
||||
}, {
|
||||
{ name = 'buffer', keyword_length = 2 },
|
||||
}),
|
||||
window = {
|
||||
documentation = cmp.config.window.bordered()
|
||||
},
|
||||
},
|
||||
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' },
|
||||
})
|
||||
})
|
||||
|
||||
-- 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 }
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline({ '/', '?' }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
|
||||
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 = vim.lsp.config
|
||||
local language_server = {
|
||||
asm_lsp = true,
|
||||
mojo = true,
|
||||
zls = true,
|
||||
emmet_language_server = true,
|
||||
rust_analyzer = true,
|
||||
--gdtoolkit = { flags = { debounce_text_changes = 150 }},
|
||||
jdtls = true,
|
||||
pylsp = true,
|
||||
phpactor = {
|
||||
init_options = {
|
||||
["language_server_phpstan.enabled"] = false,
|
||||
["language_server_psalm.enabled"] = false,
|
||||
}
|
||||
})
|
||||
|
||||
-- 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 = 'cmdline' }
|
||||
}),
|
||||
matching = { disallow_symbol_nonprefix_matching = false }
|
||||
})
|
||||
|
||||
local lsp = require("lspconfig")
|
||||
lsp.lua_ls.setup({
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(),
|
||||
},
|
||||
clangd = {
|
||||
capabilities = capabilities,
|
||||
root_dir = vim.fs.root(0, { 'compile_commands.json', 'compile_flags.txt', '.git' }), -- require("lspconfig").util.root_pattern("compile_commands.json", "compile_flags.txt", ".git"),
|
||||
cmd = { "clangd" },
|
||||
filetypes = { "c", "cpp", "objc", "objcpp" },
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim' }
|
||||
clangd = {
|
||||
compilationDatabasePath = "compile-commands.json",
|
||||
},
|
||||
}
|
||||
},
|
||||
ts_ls = true,
|
||||
gopls = true,
|
||||
intelephense = true,
|
||||
lua_ls = {
|
||||
config = {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
}
|
||||
},
|
||||
diagnostics = {
|
||||
globals = { 'vim' }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
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-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= "C:\\Users\\nigel\\AppData\\Local\\nvim\\lua\\snippets"})
|
||||
|
||||
-- Set up lspconfig.
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
require('lspconfig')['asm_lsp'].setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
local root_files = {
|
||||
'premake5.lua',
|
||||
'.clang-tidy',
|
||||
'.clang-format',
|
||||
'compile_commands',
|
||||
'compile_commands.json',
|
||||
'compile_flags.txt',
|
||||
'configure.ac',
|
||||
'.git'
|
||||
}
|
||||
local util = require('lspconfig.util')
|
||||
require('lspconfig')['clangd'].setup({
|
||||
capabilities = capabilities,
|
||||
filetypes= { 'c', 'cpp', 'objc', 'objcpp', 'cuda', 'proto' },
|
||||
cmd = { 'clangd' },
|
||||
single_file_support = true,
|
||||
root_dir = function (fname)
|
||||
return util.root_pattern(unpack(root_files))(fname)
|
||||
end
|
||||
})
|
||||
|
||||
require('lspconfig')['zls'].setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
|
||||
require('lspconfig')['rust_analyzer'].setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
|
||||
require('lspconfig')['jdtls'].setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
|
||||
require('lspconfig')['bashls'].setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
|
||||
require('lspconfig')['gopls'].setup({
|
||||
capabilities = capabilities
|
||||
})
|
||||
|
||||
require('lspconfig')['tsserver'].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)
|
||||
vim.lsp.config(name, config)
|
||||
vim.lsp.enable(name)
|
||||
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")
|
||||
|
||||
local settings = language_server[client.name]
|
||||
if type(settings) ~= "table" then
|
||||
settings = {}
|
||||
end
|
||||
|
||||
local builtin = require "telescope.builtin"
|
||||
|
||||
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 })
|
||||
|
||||
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,
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
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,
|
||||
}
|
||||
@@ -14,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 = "~/.config/nvim/lua/barink/"}
|
||||
end)
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
return {
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
@@ -12,7 +13,15 @@ return {
|
||||
dim_inactive = false,
|
||||
lualine_bold = false,
|
||||
})
|
||||
|
||||
vim.cmd [[colorscheme tokyonight]]
|
||||
end
|
||||
},
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("catppuccin").setup()
|
||||
vim.cmd.colorscheme('catppuccin')
|
||||
end
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ return {
|
||||
show_help = '?'
|
||||
}
|
||||
},
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "bash" },
|
||||
ensure_installed = { "python", "c", "lua", "vim", "vimdoc", "bash" },
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
|
||||
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 = {}
|
||||
}
|
||||
}
|
||||
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 = {}
|
||||
}
|
||||
@@ -1 +1,6 @@
|
||||
return { "mbbill/undotree" }
|
||||
return {
|
||||
"mbbill/undotree",
|
||||
config = function ()
|
||||
vim.keymap.set('n', '<leader><f1>', vim.cmd.UndotreeToggle)
|
||||
end
|
||||
}
|
||||
|
||||
3
lua/barink/plugins/vim-dadbod.lua
Normal file
3
lua/barink/plugins/vim-dadbod.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
"tpope/vim-dadbod",
|
||||
}
|
||||
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',
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
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 = {}
|
||||
}
|
||||
@@ -21,17 +21,17 @@ vim.opt.termguicolors = true
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
|
||||
vim.g.netrw_browse_split = 0
|
||||
vim.g.netrw_winsize = 25
|
||||
|
||||
vim.opt.completeopt = {'menu', 'menuone', 'noselect' }
|
||||
|
||||
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
|
||||
vim.opt.inccommand = 'split'
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
callback = function (args)
|
||||
callback = function(args)
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
if client.server_capabilities.hoverProvider then
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {buffer = args.buf})
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { buffer = args.buf })
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.g.netrw_browse_split = 0
|
||||
vim.g.netrw_winsize = 25
|
||||
|
||||
|
||||
Reference in New Issue
Block a user