1
0

Compare commits

..

27 Commits

Author SHA1 Message Date
e75c184a15 Merge branch 'Windows' 2024-10-11 21:16:06 +02:00
557e32fe9d Better harpoon keybindings 2024-10-11 21:14:07 +02:00
824d183c6e Remove noice 2024-10-11 21:13:56 +02:00
9db9a8f594 Correcting After folder 2024-10-06 19:41:15 +02:00
a6c0657d70 Removing Which-key, adding a bunch of small improvments
Highlight on yank
gitsigns
oil as default explorer
2024-10-06 17:04:11 +02:00
bd1e208133 Fix conform format on autosave 2024-10-05 23:51:35 +02:00
52c7c5099d Improvments to dap, lsp-cmp and trouble
- dap ui listeners
- LSPkind for symbols in suggestions'
- improving vim lua lsp support
- complete options added ( Preview )
- fixed annoying C-d not working ( had overwritten it for code actions)
- Added shortcut , s t to open a terminal at the bottom
- Added a keymap to exit terminal mode (thnx teejdev)
- set inccommand to split ( shows actions that will be taken in a split
window)
- fixed trouble suggestions toggle (C-t)
2024-10-05 23:20:41 +02:00
032d00a164 Added fidget back in as replacement for noice.nvim, improved telescope hotkeys
dap fix for C/C++
added java to conform
2024-10-05 15:25:46 +02:00
74937605ef Remove missed merge conflicts, Removed double oil.lua plugin file 2024-09-29 23:05:10 +02:00
a268731f19 Merging Windows into main 2024-09-29 22:58:27 +02:00
98dd2510c9 Added DBUI, noice, zen-mode and comments. Changed Tokyonight.lua to theme.lua 2024-09-27 21:08:13 +02:00
6825883350 Merge branch 'Windows' of git.barink.dev:Nigel/neovim_config into Windows 2024-09-27 20:33:02 +02:00
0167c8dbb4 Setting up conform, Adding phpactor lsp 2024-09-27 20:32:53 +02:00
5c8aeff729 Remove afte/ftplugin folder 2024-09-27 20:31:36 +02:00
5e814303f7 Add Intelephense 2024-09-26 16:31:23 +02:00
0411f4b928 Moved snippets folder, Added Oil and conform to windows config, improved lsp and telescope config 2024-09-26 16:05:29 +02:00
71f08e66aa Merge Windows config 2024-09-26 14:46:07 +02:00
12b89714dc Moved lsp configurations per language to ftplugins folder 2024-09-23 10:38:23 +02:00
6b6613aeea Added additional plugins
- Added gitsigns.nvim
- Added Treesitter.nvim
- Added Undotree.nvim
- Added vimbegood.nvim
2024-09-23 10:37:41 +02:00
1bb7a56d5c Bunch of updates to NVIM setup for Windows
Updated Settings
* Added new keymaps in keys.lua
* improved LSP setup

Plugins Removed
* codellama
* hardtime

Additional Plugins added
* Added edgy
* Added neo-tree
* Added todo-comments
* Added which-key
2024-07-15 21:58:28 +02:00
430a2879e9 FEAT: conform and oil added
Changes
- Removed hardtime ( messages were too annoying)
- Cleaned up key mappings file
- Disabled Lazy loading
- Added Oil and conform
2024-05-28 21:11:34 +02:00
0d5552904c FEAT: Added dadbod
A DB editor inside vim/neovim
2024-05-09 20:15:26 +02:00
d8d6365bee FEAT: Adding Git-Worktree and commit plugin. 2024-04-28 11:10:29 +02:00
e9488d5948 FEAT: Added emmet 2024-04-14 15:35:48 +02:00
0c2a2236a5 FEAT: Add Colour highlighting 2024-04-09 18:20:29 +02:00
b7785d460d FEAT: Adding delve debugger option
FIX: better keymapping Open_Float Diagnostic
2024-04-06 22:45:06 +02:00
1248080858 Moved the after directory to lua/barink 2024-04-06 22:44:20 +02:00
36 changed files with 739 additions and 285 deletions

5
after/ftplugin/cpp.lua Normal file
View 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'

View File

@ -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()

4
after/ftplugin/php.lua Normal file
View File

@ -0,0 +1,4 @@
vim.keymap.set("n", "<space>pa", function()
package.loaded["php.artisan"] = nil
require("php.artisan").telescope_select_artisan()
end)

View File

@ -1,10 +1,10 @@
function ColorMyPencils(color)
color = color or "tokyonight"
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"})
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end
ColorMyPencils()

View File

@ -1,32 +1,72 @@
{
"LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" },
<<<<<<< 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" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"fidget.nvim": { "branch": "main", "commit": "933db4596e4bab1b09b6d48a10e21819e4cc458f" },
"gen.nvim": { "branch": "main", "commit": "87fbe811155b90eea58622614809705b966009ad" },
"hardtime.nvim": { "branch": "main", "commit": "21b0f9146198bb43fbc9f5ec66c8af3234f278ed" },
"harpoon": { "branch": "harpoon2", "commit": "a38be6e0dd4c6db66997deab71fc4453ace97f9c" },
"lazy.nvim": { "branch": "main", "commit": "3132d7d27d56d6bb4bdd0a09623d162b3cf1c588" },
"lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" },
"mason-lspconfig": { "branch": "main", "commit": "9dfcf2036c223920826140f0151d929a43f9eceb" },
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
"nvim-cmp": { "branch": "main", "commit": "6ed1c93465c33f6a53b4c3f103bf9d1ab696382a" },
"nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" },
"nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "baa5b0dc6663284cce32e0d00ac1f2511b13496f" },
"nvim-jdtls": { "branch": "master", "commit": "8eb5f0dbe6e126b392ddcaf45893358619893e45" },
"nvim-lspconfig": { "branch": "master", "commit": "24662f92c18edd397ef12d635b11dbdedef2d094" },
"nvim-nio": { "branch": "master", "commit": "33c62b3eadd8154169e42144de16ba4db6784bec" },
"nvim-treesitter": { "branch": "master", "commit": "a951dcb7ec253544b0150251008de8b06a0874cd" },
"nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" },
"plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope.nvim": { "branch": "0.1.x", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
"tokyonight.nvim": { "branch": "main", "commit": "fbe3a27378fdd51a8ddd04f57012455436916a62" },
"trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" },
"undotree": { "branch": "master", "commit": "aa93a7e5890dbbebbc064cd22260721a6db1a196" },
"vim-fugitive": { "branch": "master", "commit": "2377e16e6641418565b934990cf49068855987c6" }
}
"conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" },
"fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" },
"gen.nvim": { "branch": "main", "commit": "0be6ca0cdfe45a7b6537cbf41bd22a420c05be85" },
"git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" },
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
"lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
"mason-lspconfig": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"neoconf.nvim": { "branch": "main", "commit": "3b6db0a913258a91951f96b09c005522cca98f1f" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
>>>>>>> Stashed changes
"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" },
<<<<<<< Updated upstream
"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" }
=======
"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
}

View File

@ -1,17 +1,24 @@
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({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("barink.keys")
require("lazy").setup("barink.plugins" , {
root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed
-- leave nil when passing the spec as the first argument to setup()
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")
})

View File

@ -5,38 +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})
local osname = vim.loop.os_uname().sysname
if osname == "Windows_NT" then
vim.keymap.set('n', '<leader>x', function() print("sorry this is windows!") end)
elseif osname == "Linux" then
-- Linux only!!
vim.keymap.set('n', '<leader>x', "<cmd>!chmod +x %<CR>", { silent = true })
end
-- 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', '<C-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('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
})

View 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
}
}

View File

@ -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,
},
}
}

View File

@ -0,0 +1,9 @@
return {
'numToStr/Comment.nvim',
lazy = false,
opts = {
},
config = function()
require("Comment").setup()
end
}

View 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
}

View 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
}

View File

@ -22,14 +22,104 @@ 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= "lldb",
request = "launch",
program = function ()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() , 'file')
end,
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",
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}"
}
}
dap.adapters.delve = {
type = 'server',
port = '${port}',
executable = {
command = 'dlv',
args = {'dap', '-l', '127.0.0.1:${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
}
}

View 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,
}
}

View File

@ -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
}

View 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
}
}

View 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,
}

View File

@ -1,9 +0,0 @@
return {
{
'm4xshen/hardtime.nvim',
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim"},
opts = {
restriction_mode = "hint"
}
}
}

View File

@ -1,22 +1,41 @@
return {
"ThePrimeagen/harpoon",
branch= "harpoon2",
dependencies = {{"nvim-lua/plenary.nvim"}},
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", "ha", function() harpoon:list():add() end)
vim.keymap.set("n", "hh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
local conf = require("telescope.config").values
local function toggle_telescope(harpoon_files)
local file_paths = {}
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)
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)
require("telescope.pickers").new({}, {
result = file_paths,
previewer = conf.file_previewer({}),
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-E>", function() harpoon:list():next() end)
vim.keymap.set("n", "<C-,>", function() harpoon:list():prev() end)
vim.keymap.set("n", "<C-.>", function() harpoon:list():next() end)
end
}

View File

@ -0,0 +1,9 @@
return {
{
'brenoprata10/nvim-highlight-colors',
config = function ()
vim.opt.termguicolors = true
require("nvim-highlight-colors").setup({})
end
}
}

View File

@ -1,136 +1,202 @@
return
{
'neovim/nvim-lspconfig',
dependencies = {
"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 = require("lspconfig")
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 = 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
})
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
})
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,
}

View 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"
},
}

View 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
}
}

View File

@ -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 = "~/.config/nvim/lua/barink/"}
end)
end
}
}

View File

@ -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
}
}

View File

@ -0,0 +1,8 @@
return {
"folke/todo-comments.nvim",
dependencies = {
"nvim-lua/plenary.nvim"
},
opts = {
}
}

View File

@ -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
}
},
}

View File

@ -0,0 +1,6 @@
return {
{
"folke/twilight.nvim",
opts = {}
}
}

View File

@ -1 +1,6 @@
return { "mbbill/undotree" }
return {
"mbbill/undotree",
config = function ()
vim.keymap.set('n', '<leader><f1>', vim.cmd.UndotreeToggle)
end
}

View File

@ -0,0 +1,3 @@
return {
"tpope/vim-dadbod",
}

View File

@ -0,0 +1,4 @@
return {
'ThePrimeagen/vim-be-good',
}

View File

@ -0,0 +1,4 @@
return {
"folke/zen-mode.nvim",
opts = {}
}

View File

@ -21,17 +21,27 @@ 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
--[[
-- 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
})]] --