Compare commits
22 Commits
12b89714dc
...
main
Author | SHA1 | Date | |
---|---|---|---|
e75c184a15 | |||
557e32fe9d | |||
824d183c6e | |||
9db9a8f594
|
|||
a6c0657d70
|
|||
bd1e208133
|
|||
52c7c5099d
|
|||
032d00a164
|
|||
74937605ef | |||
a268731f19 | |||
98dd2510c9
|
|||
6825883350
|
|||
0167c8dbb4
|
|||
5c8aeff729
|
|||
5e814303f7
|
|||
0411f4b928
|
|||
71f08e66aa
|
|||
430a2879e9
|
|||
0d5552904c
|
|||
d8d6365bee
|
|||
e9488d5948
|
|||
0c2a2236a5
|
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,38 +1,72 @@
|
|||||||
{
|
{
|
||||||
|
<<<<<<< Updated upstream
|
||||||
|
"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": "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" },
|
||||||
|
=======
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"edgy.nvim": { "branch": "main", "commit": "0e8bbab4eba9dab6c237e4a2e146dc0466897be6" },
|
"conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
|
"fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" },
|
"gen.nvim": { "branch": "main", "commit": "0be6ca0cdfe45a7b6537cbf41bd22a420c05be85" },
|
||||||
|
"git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" },
|
||||||
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
|
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "33be7ac3173c7c20b94ce7e1b9734c1a1e85f292" },
|
"lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
||||||
"mason-lspconfig": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
|
"mason-lspconfig": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" },
|
"neoconf.nvim": { "branch": "main", "commit": "3b6db0a913258a91951f96b09c005522cca98f1f" },
|
||||||
"neoconf.nvim": { "branch": "main", "commit": "04060950124f5901dd383566208b591a5bdb2929" },
|
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "a2bc1e9d0359caa5d11ad967cd1e30e8d4676226" },
|
>>>>>>> Stashed changes
|
||||||
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
|
"nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" },
|
"nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" },
|
"nvim-dap-virtual-text": { "branch": "master", "commit": "3497eb39bf413a57ab5b7e7e2e192683e462148c" },
|
||||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" },
|
"nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" },
|
||||||
"nvim-jdtls": { "branch": "master", "commit": "40e8494e04c1bcd5dd6c0d0bc187d2d10965017d" },
|
<<<<<<< Updated upstream
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "9c9eb07fecc578e25e28db8dc9002b43fff2ed79" },
|
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" },
|
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "09700b88b41ed96391de3d2010d74dc54fd5c210" },
|
"nvim-treesitter": { "branch": "master", "commit": "140f534ce9c02189921b80f5c8a68ab9e3f92ce8" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
|
"nvim-web-devicons": { "branch": "master", "commit": "1e5a2a796a88b5d696acb07dd5c285b13d13da21" },
|
||||||
|
"oil.nvim": { "branch": "master", "commit": "1360be5fda9c67338331abfcd80de2afbb395bcd" },
|
||||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "61a4a615366c470a4e9ca8f8b45718b6b92af73f" },
|
"telescope.nvim": { "branch": "master", "commit": "cb3f98d935842836cc115e8c9e4b38c1380fbb6b" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "96fee098a90e7c09c9811aa7df71d773ba8b9b53" },
|
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "30d7be361a7fbf187a881f17e574e9213d5108ea" },
|
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "88c3be40c061ce053ab326ce4fdcb973a1f785ff" },
|
"twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" },
|
||||||
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
|
||||||
"vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" },
|
"vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" },
|
||||||
"vim-fugitive": { "branch": "master", "commit": "64d6cafb9dcbacce18c26d7daf617ebb96b273f3" },
|
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "7915964e73c30ba5657e9a762c6570925dad421b" }
|
"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" }
|
||||||
|
=======
|
||||||
|
"nvim-jdtls": { "branch": "master", "commit": "efe813854432a314b472226dca813f0f2598d44a" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "76e7c8b029e6517f3689390d6599e9b446551704" },
|
||||||
|
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "140f534ce9c02189921b80f5c8a68ab9e3f92ce8" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "1e5a2a796a88b5d696acb07dd5c285b13d13da21" },
|
||||||
|
"oil.nvim": { "branch": "master", "commit": "1360be5fda9c67338331abfcd80de2afbb395bcd" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "cb3f98d935842836cc115e8c9e4b38c1380fbb6b" },
|
||||||
|
"tokyonight.nvim": { "branch": "main", "commit": "817bb6ffff1b9ce72cdd45d9fcfa8c9cd1ad3839" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
|
||||||
|
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
|
||||||
|
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
|
||||||
|
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" }
|
||||||
|
>>>>>>> Stashed changes
|
||||||
}
|
}
|
@ -1,3 +0,0 @@
|
|||||||
require('lspconfig')['asm_lsp'].setup({
|
|
||||||
capabilities = capabilities
|
|
||||||
})
|
|
@ -1,3 +0,0 @@
|
|||||||
require('lspconfig')['bashls'].setup({
|
|
||||||
capabilities = capabilities
|
|
||||||
})
|
|
@ -1,20 +0,0 @@
|
|||||||
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
|
|
||||||
})
|
|
@ -1,39 +0,0 @@
|
|||||||
require('lspconfig')['gopls'].setup({
|
|
||||||
capabilities = capabilities
|
|
||||||
})
|
|
||||||
|
|
||||||
local dap = require("dap")
|
|
||||||
|
|
||||||
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,20 +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()
|
|
||||||
|
|
||||||
-- Set up lspconfig.
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|
||||||
require('lspconfig')['jdtls'].setup({
|
|
||||||
capabilities = capabilities
|
|
||||||
})
|
|
@ -1,3 +0,0 @@
|
|||||||
require('lspconfig')['tsserver'].setup({
|
|
||||||
capabilities = capabilities
|
|
||||||
})
|
|
@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
local lsp = require("lspconfig")
|
|
||||||
lsp.lua_ls.setup({
|
|
||||||
capabilities = require('cmp_nvim_lsp').default_capabilities(),
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
diagnostics = {
|
|
||||||
globals = { 'vim' }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
|||||||
-- Set up lspconfig.
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|
||||||
|
|
||||||
require('lspconfig')['pyright'].setup({
|
|
||||||
capabilities = capabilities
|
|
||||||
})
|
|
@ -1,6 +0,0 @@
|
|||||||
-- Set up lspconfig.
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|
||||||
|
|
||||||
require('lspconfig')['rust_analyzer'].setup({
|
|
||||||
capabilities = capabilities
|
|
||||||
})
|
|
@ -1,6 +0,0 @@
|
|||||||
-- Set up lspconfig.
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|
||||||
|
|
||||||
require('lspconfig')['zls'].setup({
|
|
||||||
capabilities = capabilities
|
|
||||||
})
|
|
@ -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.vim")
|
||||||
require("barink.keys")
|
|
||||||
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
@ -13,5 +11,14 @@ if not vim.loop.fs_stat(lazypath) then
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
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()
|
||||||
|
change_detection = {
|
||||||
|
-- automatically check for config file changes and reload the ui
|
||||||
|
enabled = false,
|
||||||
|
notify = true, -- get a notification when changes are found
|
||||||
|
},
|
||||||
|
|
||||||
require("lazy").setup("barink.plugins")
|
})
|
||||||
|
@ -20,17 +20,55 @@ vim.keymap.set('n', '<A-S-k>', ':m .-2<CR>==', {noremap = true})
|
|||||||
vim.keymap.set('i', '<A-j>', ':m .+1<CR>==gi', { noremap = true })
|
vim.keymap.set('i', '<A-j>', ':m .+1<CR>==gi', { noremap = true })
|
||||||
vim.keymap.set('i', '<A-k>', ':m .-2<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 !
|
-- Diagnostics !
|
||||||
vim.keymap.set('n', '<C-T>', function() require('trouble').toggle() 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>d', function() vim.diagnostic.open_float() end)
|
||||||
vim.keymap.set('n', '<leader>dn', function() vim.diagnostic.goto_next() 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>dp', function() vim.diagnostic.goto_prev() end)
|
||||||
vim.keymap.set('n', '<C-d>', function () vim.lsp.buf.code_action() end)
|
vim.keymap.set('n', '<leader>ca', function() vim.lsp.buf.code_action() end)
|
||||||
-- Debugging
|
-- Debugging
|
||||||
vim.keymap.set('n', '<leader>sb', function () require('dap').toggle_breakpoint() end )
|
vim.keymap.set('n', '<leader>b', function() require('dap').toggle_breakpoint() end)
|
||||||
vim.keymap.set('n', '<leader>db', function () require('dapui').toggle() end )
|
vim.keymap.set('n', '<F5>', function()
|
||||||
vim.keymap.set('n', '<F5>', function () print("Start debug session" ) require('dap').continue() end )
|
print("Start debug session")
|
||||||
|
require('dap').continue()
|
||||||
|
end)
|
||||||
vim.keymap.set('n', '<F6>', function() require('dap').step_over() 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', '<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
|
||||||
|
})
|
||||||
|
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 = true
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
'nvim-tree/nvim-web-devicons'
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
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 ()
|
config = function ()
|
||||||
local dap = require('dap')
|
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 = {
|
dap.configurations.cpp = {
|
||||||
{
|
{
|
||||||
name = "Launch",
|
name = "Launch",
|
||||||
type= "codelldb",
|
type= "lldb",
|
||||||
request = "launch",
|
request = "launch",
|
||||||
program = function ()
|
program = function ()
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() , 'file')
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() , 'file')
|
||||||
end,
|
end,
|
||||||
cwd = '${workspaceFolder}/Framework',
|
|
||||||
stopOnEntry = false,
|
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 = {
|
dap.configurations.java = {
|
||||||
{
|
{
|
||||||
type = 'java';
|
type = 'java',
|
||||||
request = 'launch';
|
request = 'launch',
|
||||||
name = "Launch file";
|
name = "Launch file",
|
||||||
program = "java ${file}";
|
program = "java ${file}",
|
||||||
}}
|
}}
|
||||||
|
-- Golang config
|
||||||
dap.configurations.go = {
|
dap.configurations.go = {
|
||||||
{
|
{
|
||||||
type = "delve",
|
type = "delve",
|
||||||
@ -72,14 +106,20 @@ return {
|
|||||||
args = {'dap', '-l', '127.0.0.1:${port}'},
|
args = {'dap', '-l', '127.0.0.1:${port}'},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dap.adapters.codelldb = {
|
local dap = require("dap")
|
||||||
type= 'server',
|
local ui = require("dapui")
|
||||||
port = '${port}',
|
dap.listeners.before.attach.dapui_config = function()
|
||||||
executable = {
|
ui.open()
|
||||||
command = 'C:/Users/Nigel/Appdata/Local/nvim-data/mason/bin/codelldb.cmd',
|
end
|
||||||
args = {"--port", "${port}"}
|
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
|
end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,29 @@
|
|||||||
return {
|
return {
|
||||||
"folke/edgy.nvim",
|
"folke/edgy.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {},
|
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 ()
|
init = function ()
|
||||||
vim.opt.laststatus = 3
|
vim.opt.laststatus = 3
|
||||||
vim.opt.splitkeep = "screen"
|
vim.opt.splitkeep = "screen"
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
return {
|
return {
|
||||||
"j-hui/fidget.nvim",
|
"j-hui/fidget.nvim",
|
||||||
opts = {
|
config = function()
|
||||||
notification = {
|
local opts = {
|
||||||
window = { winblend = 0},
|
}
|
||||||
},
|
require("fidget").setup(opts)
|
||||||
},
|
end
|
||||||
}
|
}
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,29 @@
|
|||||||
return {
|
return {
|
||||||
'lewis6991/gitsigns.nvim',
|
'lewis6991/gitsigns.nvim',
|
||||||
opt = {}
|
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,41 @@
|
|||||||
return {
|
return {
|
||||||
"ThePrimeagen/harpoon",
|
"ThePrimeagen/harpoon",
|
||||||
branch= "harpoon2",
|
branch= "harpoon2",
|
||||||
dependencies = {{"nvim-lua/plenary.nvim"}},
|
dependencies = {
|
||||||
|
{"nvim-lua/plenary.nvim"},
|
||||||
|
{"nvim-telescope/telescope.nvim"}
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local harpoon = require("harpoon")
|
local harpoon = require("harpoon")
|
||||||
harpoon.setup()
|
harpoon.setup()
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>a", function() harpoon:list():append() end)
|
vim.keymap.set("n", "ha", function() harpoon:list():add() end)
|
||||||
vim.keymap.set("n", "<C-h>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) 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 = {}
|
||||||
|
for _, item in ipairs(harpoon_files.items) do
|
||||||
|
table.insert(file_paths, item.value)
|
||||||
|
end
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>1", function() harpoon:list():select(1) end)
|
require("telescope.pickers").new({}, {
|
||||||
vim.keymap.set("n", "<leader>2", function() harpoon:list():select(2) end)
|
result = file_paths,
|
||||||
vim.keymap.set("n", "<leader>3", function() harpoon:list():select(3) end)
|
previewer = conf.file_previewer({}),
|
||||||
vim.keymap.set("n", "<leader>4", function() harpoon:list():select(4) end)
|
sorter = conf.generic_sorter({}),
|
||||||
|
}):find()
|
||||||
|
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-,>", function() harpoon:list():prev() end)
|
||||||
vim.keymap.set("n", "<C-E>", function() harpoon:list():next() end)
|
vim.keymap.set("n", "<C-.>", function() harpoon:list():next() end)
|
||||||
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
9
lua/barink/plugins/highlight-colors.lua
Normal file
9
lua/barink/plugins/highlight-colors.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'brenoprata10/nvim-highlight-colors',
|
||||||
|
config = function ()
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
require("nvim-highlight-colors").setup({})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
@ -15,18 +15,39 @@ return
|
|||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
{
|
{
|
||||||
'L3MON4D3/LuaSnip',
|
'L3MON4D3/LuaSnip',
|
||||||
dependencies = 'hrsh7th/nvim-cmp',
|
dependencies = {
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
'rafamadriz/friendly-snippets',
|
||||||
|
},
|
||||||
version = "v2.*",
|
version = "v2.*",
|
||||||
},
|
},
|
||||||
{ 'mfussenegger/nvim-jdtls', dependencies = { 'nvim-dap' } },
|
{ 'mfussenegger/nvim-jdtls', dependencies = { 'nvim-dap' } },
|
||||||
|
"onsails/lspkind.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
vim.opt.completeopt = { "menu", "menuone", "noselect", "preview" }
|
||||||
|
require("lspkind").init({})
|
||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
ensure_installed = { "lua_ls", "bashls", "rust_analyzer" }
|
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 cmp = require('cmp')
|
||||||
|
local lspkind = require("lspkind")
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
|
formatting = {
|
||||||
|
format = lspkind.cmp_format({
|
||||||
|
mode = 'symbol',
|
||||||
|
maxwidth = 60,
|
||||||
|
ellipsis_char = '...',
|
||||||
|
show_labelDetails = true,
|
||||||
|
}),
|
||||||
|
},
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
require('luasnip').lsp_expand(args.body)
|
require('luasnip').lsp_expand(args.body)
|
||||||
@ -35,15 +56,14 @@ return
|
|||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
['<C-space>'] = cmp.mapping.complete(),
|
||||||
['<C-e>'] = cmp.mapping.abort(),
|
['<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-y>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'nvim_lsp', keyword_length = 1 },
|
{ name = 'nvim_lsp', keyword_length = 1 },
|
||||||
{ name = 'luasnip', option = { show_autosnippets = true}},
|
{ name = 'luasnip' },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
}, {
|
|
||||||
{ name = 'buffer', keyword_length = 2 },
|
{ name = 'buffer', keyword_length = 2 },
|
||||||
}),
|
}),
|
||||||
window = {
|
window = {
|
||||||
@ -61,46 +81,122 @@ return
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
cmp.setup.filetype({ "sql" }, {
|
||||||
cmp.setup.cmdline({ '/', '?' }, {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = {
|
sources = {
|
||||||
{ name = 'buffer' }
|
{ 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).
|
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||||
cmp.setup.cmdline(':', {
|
cmp.setup.cmdline(':', {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'path' }
|
{ name = 'path' },
|
||||||
|
{ name = 'buffer' }
|
||||||
}, {
|
}, {
|
||||||
{ name = 'cmdline' }
|
{ name = 'cmdline' }
|
||||||
}),
|
}),
|
||||||
matching = { disallow_symbol_nonprefix_matching = false }
|
matching = { disallow_symbol_nonprefix_matching = false }
|
||||||
})
|
})
|
||||||
|
|
||||||
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-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-n>", 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-p>", function() ls.jump(-1) end, { silent = true })
|
||||||
vim.keymap.set({ "i", "s" }, "<C-E>", function()
|
vim.keymap.set({ "i", "s" }, "<C-E>", function()
|
||||||
if ls.choice_active() then
|
if ls.choice_active() then
|
||||||
ls.change_choice(1)
|
ls.change_choice(1)
|
||||||
end
|
end
|
||||||
end, { silent = true })
|
end, { silent = true })
|
||||||
|
|
||||||
require("luasnip.loaders.from_lua").load({paths= "C:\\Users\\nigel\\AppData\\Local\\nvim\\lua\\snippets"})
|
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/lua/barink/snippets" })
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
-- Set up lspconfig.
|
-- Set up lspconfig.
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
local lsp = require("lspconfig")
|
||||||
|
|
||||||
end
|
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,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
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 = {
|
||||||
|
config = {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
runtime = {
|
||||||
|
version = 'LuaJIT',
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
checkThirdParty = false,
|
||||||
|
library = {
|
||||||
|
vim.env.VIMRUNTIME
|
||||||
|
}
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
globals = { 'vim' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
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")
|
||||||
|
|
||||||
|
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,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 = true
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
'nvim-tree/nvim-web-devicons'
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
@ -14,8 +14,15 @@ return {
|
|||||||
require('telescope').load_extension('fzf')
|
require('telescope').load_extension('fzf')
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
vim.keymap.set('n', '<leader>fd', builtin.find_files, {})
|
||||||
vim.keymap.set('n', '<leader>fs', builtin.git_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
|
end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
|
{
|
||||||
"folke/tokyonight.nvim",
|
"folke/tokyonight.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
@ -12,7 +13,15 @@ return {
|
|||||||
dim_inactive = false,
|
dim_inactive = false,
|
||||||
lualine_bold = false,
|
lualine_bold = false,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
vim.cmd [[colorscheme tokyonight]]
|
},
|
||||||
|
{
|
||||||
|
"catppuccin/nvim",
|
||||||
|
name = "catppuccin",
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
require("catppuccin").setup()
|
||||||
|
vim.cmd.colorscheme('catppuccin')
|
||||||
end
|
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 = {}
|
||||||
|
}
|
||||||
|
}
|
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",
|
||||||
|
}
|
@ -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,11 +21,8 @@ vim.opt.termguicolors = true
|
|||||||
|
|
||||||
vim.opt.scrolloff = 8
|
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', {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
@ -35,3 +32,16 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
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