Compare commits
22 Commits
nixos
...
e1d5f7d9ae
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1d5f7d9ae | ||
|
|
09900d1ebf | ||
| b6471168fb | |||
| 8bf693ba29 | |||
| b1ecff2e08 | |||
| 8894b0ccdb | |||
| 132e1aa78a | |||
| b92b8ed602 | |||
| a947bcda9b | |||
| 0325d883bc | |||
| 67c2b52e4d | |||
| 23cf6254ec | |||
| f53b5f6905 | |||
| cb80bb1750 | |||
| 68ea39094c | |||
| 0334178b6e | |||
| 4a596c757b | |||
| a6bf1207d7 | |||
| a93c15e29e | |||
| bcc806d349 | |||
| 6871470b6c | |||
| c49b758e86 |
7
.luarc.json
Normal file
7
.luarc.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"diagnostics.disable": [
|
||||||
|
"undefined-global",
|
||||||
|
"unused-local"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
# My nvim configuration
|
# My nvim configuration
|
||||||
|
|
||||||
This mostly copies ThePrimeagen configs with some changes because I don't use dvorak
|
This mostly copies ThePrimeagen configs with some changes because I don't use dvorak
|
||||||
|
|
||||||
|
|||||||
5
after/ftplugin/helm.lua
Normal file
5
after/ftplugin/helm.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
vim.opt_local.tabstop = 2
|
||||||
|
vim.opt_local.shiftwidth = 2
|
||||||
|
vim.opt_local.softtabstop = 2
|
||||||
|
vim.opt_local.expandtab = true
|
||||||
|
|
||||||
12
after/ftplugin/make.lua
Normal file
12
after/ftplugin/make.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
vim.opt_local.tabstop = 4
|
||||||
|
vim.opt_local.shiftwidth = 4
|
||||||
|
vim.opt_local.softtabstop = 4
|
||||||
|
vim.opt_local.expandtab = false
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "make",
|
||||||
|
callback = function()
|
||||||
|
print("Makefile detected and ftplugin loaded!")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
2
after/ftplugin/markdown.lua
Normal file
2
after/ftplugin/markdown.lua
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
vim.opt_local.conceallevel = 2
|
||||||
|
|
||||||
5
after/ftplugin/yaml.lua
Normal file
5
after/ftplugin/yaml.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
vim.opt_local.tabstop = 2
|
||||||
|
vim.opt_local.shiftwidth = 2
|
||||||
|
vim.opt_local.softtabstop = 2
|
||||||
|
vim.opt_local.expandtab = true
|
||||||
|
|
||||||
@@ -1,42 +1,40 @@
|
|||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" },
|
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"blink.cmp": { "branch": "main", "commit": "5f442681df24fe705d1ee7ce5b4d435aa4b4dee4" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },
|
||||||
"cmp-dotenv": { "branch": "main", "commit": "4dd53aab60982f1f75848aec5e6214986263325e" },
|
"fidget.nvim": { "branch": "main", "commit": "9238947645ce17d96f30842e61ba81147185b657" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"gruvbox.nvim": { "branch": "main", "commit": "68c3460a5d1d1a362318960035c9f3466d5011f5" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
|
"harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" },
|
"hererocks": { "branch": "master", "commit": "c9c5444dea1e07e005484014a8231aa667be30b6" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" },
|
||||||
"git-blame.nvim": { "branch": "master", "commit": "2883a7460f611c2705b23f12d58d398d5ce6ec00" },
|
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
|
||||||
"gruvbox.nvim": { "branch": "main", "commit": "49d9c0b150ba70efcd831ec7b3cb8ee740067045" },
|
"lazydev.nvim": { "branch": "main", "commit": "8620f82ee3f59ff2187647167b6b47387a13a018" },
|
||||||
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
|
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||||
"hererocks": { "branch": "master", "commit": "8bd2fcfdd65cfa7535ce39ea372a63b0bdb8e528" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "2daa8921b7afdcfa47419a21ea343c3df6d74fa0" },
|
||||||
"icon-picker.nvim": { "branch": "master", "commit": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3" },
|
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
|
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
"mini.surround": { "branch": "main", "commit": "0e67c4bc147f2a15cee94e7c94dcc0e115b9f55e" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
|
"none-ls.nvim": { "branch": "main", "commit": "40dc2e983560acaea29d6312b33fafba37b0c272" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "056f569f71e4b726323b799b9cfacc53653bceb3" },
|
"nvim-lspconfig": { "branch": "master", "commit": "056f569f71e4b726323b799b9cfacc53653bceb3" },
|
||||||
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
|
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
|
||||||
"nvim-sops": { "branch": "main", "commit": "cb2209562d00ef8c6c88bdec836d9edb8fbb96ef" },
|
"nvim-sops": { "branch": "main", "commit": "cb2209562d00ef8c6c88bdec836d9edb8fbb96ef" },
|
||||||
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
|
"nvim-treesitter": { "branch": "master", "commit": "50947387c20ec3fb8c30b8c1c1a1c39f68deb970" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "5a2ff8b7ca5470b1011ed82ef3fdd53139ffc467" },
|
"nvim-ufo": { "branch": "main", "commit": "270ca542dae992ffe40274718c63645217ebc8bf" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
|
"nvim-web-devicons": { "branch": "master", "commit": "15c7d0f616ebf88960ce5c4221828f62789d36d9" },
|
||||||
"oil.nvim": { "branch": "master", "commit": "ccab9d5e09e2d0042fbbe5b6bd05e82426247067" },
|
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
|
||||||
|
"oil.nvim": { "branch": "master", "commit": "ba858b662599eab8ef1cba9ab745afded99cb180" },
|
||||||
"plenary": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
"plenary": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
|
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||||
"search.nvim": { "branch": "main", "commit": "7b8f2315d031be73e14bc2d82386dfac15952614" },
|
"search.nvim": { "branch": "main", "commit": "7b8f2315d031be73e14bc2d82386dfac15952614" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "df534c3042572fb958586facd02841e10186707c" },
|
"statuscol.nvim": { "branch": "main", "commit": "8822f76e105549620ef9c0d96e7b95aedf14c490" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "254145ffd528b98eb20be894338e2d5c93fa02c2" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" },
|
||||||
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
|
"undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" },
|
||||||
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
|
"vim-fugitive": { "branch": "master", "commit": "fcb4db52e7f65b95705aa58f0f2df1312c1f2df2" },
|
||||||
"vim-gitgutter": { "branch": "main", "commit": "7b0b5098e3e57be86bb96cfbf2b8902381eef57c" },
|
|
||||||
"vim-helm": { "branch": "master", "commit": "ae1ebc160d2b9b90108477ab10df7a4fc501e358" }
|
"vim-helm": { "branch": "master", "commit": "ae1ebc160d2b9b90108477ab10df7a4fc501e358" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ local augroup = vim.api.nvim_create_augroup
|
|||||||
local CrentistGroup = augroup('Crentist', {})
|
local CrentistGroup = augroup('Crentist', {})
|
||||||
local OnSaveGroup = augroup('CrentistOnSave', {})
|
local OnSaveGroup = augroup('CrentistOnSave', {})
|
||||||
|
|
||||||
|
local builtin = require('telescope.builtin')
|
||||||
|
|
||||||
autocmd('LspAttach', {
|
autocmd('LspAttach', {
|
||||||
group = CrentistGroup,
|
group = CrentistGroup,
|
||||||
callback = function(e)
|
callback = function(e)
|
||||||
@@ -13,17 +15,17 @@ autocmd('LspAttach', {
|
|||||||
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
|
vim.keymap.set("n", "<leader>vrr", function() builtin.lsp_references() end, opts)
|
||||||
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
||||||
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||||
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
|
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
|
||||||
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
|
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
|
||||||
vim.keymap.set("n", "<M-F>", "<cmd>lua vim.lsp.buf.format()<CR>")
|
vim.keymap.set("n", "<M-F>", function() vim.lsp.buf.format() end, opts)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Add new line to the end of the file
|
-- Add new line to the end of the file
|
||||||
autocmd({ "BufWritePre" }, {
|
autocmd({ 'BufWritePre' }, {
|
||||||
group = OnSaveGroup,
|
group = OnSaveGroup,
|
||||||
pattern = '*',
|
pattern = '*',
|
||||||
callback = function()
|
callback = function()
|
||||||
@@ -37,7 +39,7 @@ autocmd({ "BufWritePre" }, {
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- Remove trailing spaces
|
-- Remove trailing spaces
|
||||||
autocmd({ "BufWritePre" }, {
|
autocmd({ 'BufWritePre' }, {
|
||||||
group = OnSaveGroup,
|
group = OnSaveGroup,
|
||||||
pattern = { "*" },
|
pattern = { "*" },
|
||||||
callback = function()
|
callback = function()
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
require("crentist.remap")
|
require("crentist.remap")
|
||||||
require("crentist.set")
|
require("crentist.set")
|
||||||
require("crentist.autocmd")
|
|
||||||
require("crentist.lazy_init")
|
require("crentist.lazy_init")
|
||||||
|
require("crentist.autocmd")
|
||||||
require("crentist.filetype")
|
require("crentist.filetype")
|
||||||
require("crentist.luasnip")
|
require("crentist.luasnip")
|
||||||
|
require("crentist.null-ls")
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
'windwp/nvim-autopairs',
|
|
||||||
event = "InsertEnter",
|
|
||||||
config = true
|
|
||||||
}
|
|
||||||
@@ -1,20 +1,40 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"ellisonleao/gruvbox.nvim",
|
'ellisonleao/gruvbox.nvim',
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
require("gruvbox").setup({
|
local gruvbox = require('gruvbox')
|
||||||
|
|
||||||
|
gruvbox.setup({
|
||||||
|
transparent_mode = false,
|
||||||
italic = {
|
italic = {
|
||||||
strings = false,
|
strings = false,
|
||||||
|
emphasis = true,
|
||||||
|
comments = true,
|
||||||
|
operators = false,
|
||||||
|
folds = true,
|
||||||
|
},
|
||||||
|
overrides = {
|
||||||
|
FoldColumn = { bg = '#282828', fg = '#808080' },
|
||||||
|
GruvboxRedSign = { bg = '' },
|
||||||
|
GruvboxGreenSign = { bg = '' },
|
||||||
|
GruvboxYellowSign = { bg = '' },
|
||||||
|
GruvboxBlueSign = { bg = '' },
|
||||||
|
GruvboxPurpleSign = { bg = '' },
|
||||||
|
GruvboxAquaSign = { bg = '' },
|
||||||
|
GruvboxOrangeSign = { bg = '' },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
vim.cmd("colorscheme gruvbox")
|
vim.cmd('colorscheme gruvbox')
|
||||||
|
|
||||||
|
vim.api.nvim_set_hl(0, 'SignColumn', { link = 'FoldColumn' })
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"norcalli/nvim-colorizer.lua",
|
'norcalli/nvim-colorizer.lua',
|
||||||
config = function()
|
config = function()
|
||||||
require('colorizer').setup({ '*' })
|
require('colorizer').setup({ '*' })
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
43
lua/crentist/lazy/completion.lua
Normal file
43
lua/crentist/lazy/completion.lua
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
return {
|
||||||
|
'saghen/blink.cmp',
|
||||||
|
-- optional: provides snippets for the snippet source
|
||||||
|
dependencies = {
|
||||||
|
'rafamadriz/friendly-snippets',
|
||||||
|
{ 'L3MON4D3/LuaSnip', version = 'v2.*' }
|
||||||
|
},
|
||||||
|
-- use a release tag to download pre-built binaries
|
||||||
|
version = 'v0.*',
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
snippets = {
|
||||||
|
expand = function(snippet) require('luasnip').lsp_expand(snippet) end,
|
||||||
|
active = function(filter)
|
||||||
|
if filter and filter.direction then
|
||||||
|
return require('luasnip').jumpable(filter.direction)
|
||||||
|
end
|
||||||
|
return require('luasnip').in_snippet()
|
||||||
|
end,
|
||||||
|
jump = function(direction) require('luasnip').jump(direction) end,
|
||||||
|
},
|
||||||
|
|
||||||
|
completion = { list = { selection = "auto_insert" } },
|
||||||
|
keymap = {
|
||||||
|
preset = 'enter',
|
||||||
|
['<Tab>'] = { 'select_next', 'snippet_forward', 'fallback' },
|
||||||
|
['<S-Tab>'] = { 'select_prev', 'snippet_backward', 'fallback' },
|
||||||
|
},
|
||||||
|
|
||||||
|
appearance = {
|
||||||
|
use_nvim_cmp_as_default = true,
|
||||||
|
nerd_font_variant = 'mono'
|
||||||
|
},
|
||||||
|
|
||||||
|
sources = {
|
||||||
|
default = { 'lsp', 'luasnip', 'path', 'buffer' },
|
||||||
|
cmdline = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
signature = { enabled = true }
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
return {
|
|
||||||
'f-person/git-blame.nvim',
|
|
||||||
config = function()
|
|
||||||
local gitblame = require('gitblame')
|
|
||||||
gitblame.setup({
|
|
||||||
enabled = true,
|
|
||||||
date_format = '%r'
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>gbt", function()
|
|
||||||
gitblame.toggle()
|
|
||||||
end)
|
|
||||||
|
|
||||||
local CrentistGitBlame = vim.api.nvim_create_augroup("CrentistGitBlame", {})
|
|
||||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
|
||||||
group = CrentistGitBlame,
|
|
||||||
pattern = "netrw",
|
|
||||||
callback = function()
|
|
||||||
gitblame.disable()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
return {
|
|
||||||
"airblade/vim-gitgutter",
|
|
||||||
}
|
|
||||||
11
lua/crentist/lazy/gitsigns.lua
Normal file
11
lua/crentist/lazy/gitsigns.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
return {
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
opts = {
|
||||||
|
current_line_blame = true,
|
||||||
|
attach_to_untracked = true,
|
||||||
|
current_line_blame_opts = {
|
||||||
|
delay = 500,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ return {
|
|||||||
table.insert(file_paths, item.value)
|
table.insert(file_paths, item.value)
|
||||||
end
|
end
|
||||||
|
|
||||||
require("telescope.pickers").new({}, {
|
require('telescope.pickers').new({}, {
|
||||||
prompt_title = "Harpoon",
|
prompt_title = "Harpoon",
|
||||||
finder = require("telescope.finders").new_table({
|
finder = require("telescope.finders").new_table({
|
||||||
results = file_paths,
|
results = file_paths,
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
return {
|
|
||||||
"ziontee113/icon-picker.nvim",
|
|
||||||
config = function()
|
|
||||||
require("icon-picker").setup({ disable_legacy_commands = true })
|
|
||||||
|
|
||||||
local opts = { noremap = true, silent = true }
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader><Leader>i", "<cmd>IconPickerNormal<cr>", opts)
|
|
||||||
vim.keymap.set("n", "<Leader><Leader>y", "<cmd>IconPickerYank<cr>", opts) --> Yank the selected icon into register
|
|
||||||
vim.keymap.set("i", "<C-i>", "<cmd>IconPickerInsert<cr>", opts)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,28 +1,30 @@
|
|||||||
return {
|
return {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
tag = "v1.0.0",
|
tag = 'v1.0.0',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
'williamboman/mason-lspconfig.nvim',
|
'williamboman/mason-lspconfig.nvim',
|
||||||
'hrsh7th/nvim-cmp',
|
'saghen/blink.cmp',
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
|
||||||
'hrsh7th/cmp-buffer',
|
|
||||||
'hrsh7th/cmp-path',
|
|
||||||
'SergioRibera/cmp-dotenv',
|
|
||||||
'hrsh7th/cmp-cmdline',
|
|
||||||
'saadparwaiz1/cmp_luasnip',
|
|
||||||
'L3MON4D3/LuaSnip',
|
'L3MON4D3/LuaSnip',
|
||||||
'j-hui/fidget.nvim',
|
'j-hui/fidget.nvim',
|
||||||
'rafamadriz/friendly-snippets',
|
'rafamadriz/friendly-snippets',
|
||||||
{ 'towolf/vim-helm', ft = 'helm' },
|
{ 'towolf/vim-helm', ft = 'helm' },
|
||||||
|
{
|
||||||
|
'folke/lazydev.nvim',
|
||||||
|
ft = 'lua', -- only load on lua files
|
||||||
|
opts = {
|
||||||
|
library = {
|
||||||
|
-- See the configuration section for more details
|
||||||
|
-- Load luvit types when the `vim.uv` word is found
|
||||||
|
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
|
|
||||||
local cmp = require('cmp')
|
|
||||||
local luasnip = require('luasnip')
|
|
||||||
|
|
||||||
-- load snippets from friendly-snippets
|
-- load snippets from friendly-snippets
|
||||||
require('luasnip.loaders.from_vscode').lazy_load()
|
require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
|
|
||||||
@@ -41,70 +43,17 @@ return {
|
|||||||
'ansiblels',
|
'ansiblels',
|
||||||
'terraformls',
|
'terraformls',
|
||||||
'helm_ls',
|
'helm_ls',
|
||||||
|
'marksman',
|
||||||
},
|
},
|
||||||
handlers = {
|
handlers = {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||||
require('lspconfig')[server_name].setup({
|
require('lspconfig')[server_name].setup({
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
cmp.setup({
|
|
||||||
sources = {
|
|
||||||
{ name = 'path' },
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
{ name = 'luasnip', keyword_length = 2 },
|
|
||||||
{ name = 'buffer', keyword_length = 3 },
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
-- `Enter` key to confirm completion
|
|
||||||
['<CR>'] = cmp.mapping({
|
|
||||||
i = function(fallback)
|
|
||||||
if cmp.visible() and cmp.get_active_entry() then
|
|
||||||
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
s = cmp.mapping.confirm({ select = true }),
|
|
||||||
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
|
||||||
}),
|
|
||||||
['<Tab>'] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif luasnip.locally_jumpable(1) then
|
|
||||||
luasnip.jump(1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { 'i', 's' }),
|
|
||||||
|
|
||||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif luasnip.locally_jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { 'i', 's' }),
|
|
||||||
|
|
||||||
-- Ctrl+Space to trigger completion menu
|
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
|
||||||
|
|
||||||
-- Scroll up and down in the completion documentation
|
|
||||||
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
}),
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
require('luasnip').lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
local pythonLineLength = 95
|
local pythonLineLength = 95
|
||||||
lspconfig.pylsp.setup {
|
lspconfig.pylsp.setup {
|
||||||
@@ -121,37 +70,8 @@ return {
|
|||||||
}
|
}
|
||||||
lspconfig.ansiblels.setup {}
|
lspconfig.ansiblels.setup {}
|
||||||
|
|
||||||
lspconfig.lua_ls.setup {
|
lspconfig.lua_ls.setup {}
|
||||||
on_init = function(client)
|
|
||||||
local path = client.workspace_folders[1].name
|
|
||||||
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
|
||||||
runtime = {
|
|
||||||
-- Tell the language server which version of Lua you're using
|
|
||||||
-- (most likely LuaJIT in the case of Neovim)
|
|
||||||
version = 'LuaJIT'
|
|
||||||
},
|
|
||||||
-- Make the server aware of Neovim runtime files
|
|
||||||
workspace = {
|
|
||||||
checkThirdParty = false,
|
|
||||||
library = {
|
|
||||||
vim.env.VIMRUNTIME
|
|
||||||
-- Depending on the usage, you might want to add additional paths here.
|
|
||||||
-- '${3rd}/luv/library'
|
|
||||||
-- '${3rd}/busted/library',
|
|
||||||
}
|
|
||||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
|
||||||
-- library = vim.api.nvim_get_runtime_file('', true)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
settings = {
|
|
||||||
Lua = {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
lspconfig.helm_ls.setup {
|
lspconfig.helm_ls.setup {
|
||||||
settings = {
|
settings = {
|
||||||
['helm-ls'] = {
|
['helm-ls'] = {
|
||||||
@@ -161,6 +81,9 @@ return {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lspconfig.yamlls.setup { }
|
||||||
|
|
||||||
lspconfig.terraformls.setup {
|
lspconfig.terraformls.setup {
|
||||||
filetypes = { 'terraform', 'terraform-vars', 'tf' }
|
filetypes = { 'terraform', 'terraform-vars', 'tf' }
|
||||||
}
|
}
|
||||||
|
|||||||
8
lua/crentist/lazy/mini.lua
Normal file
8
lua/crentist/lazy/mini.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
'echasnovski/mini.surround',
|
||||||
|
version = '*',
|
||||||
|
config = function ()
|
||||||
|
require('mini.surround').setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
return {
|
|
||||||
{ "folke/neodev.nvim", opts = {} }
|
|
||||||
}
|
|
||||||
11
lua/crentist/lazy/none-ls.lua
Normal file
11
lua/crentist/lazy/none-ls.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
return {
|
||||||
|
'nvimtools/none-ls.nvim',
|
||||||
|
-- Optional dependencies
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
|
opts = {},
|
||||||
|
config = function()
|
||||||
|
local null_ls = require('null-ls')
|
||||||
|
null_ls.setup({})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
53
lua/crentist/lazy/obsidian.lua
Normal file
53
lua/crentist/lazy/obsidian.lua
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
return {
|
||||||
|
'epwalsh/obsidian.nvim',
|
||||||
|
version = '*', -- recommended, use latest release instead of latest commit
|
||||||
|
dependencies = {
|
||||||
|
-- Required.
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{'<leader>ot', '<cmd>ObsidianToday<CR>', desc = "Open today's daily note"},
|
||||||
|
{'<leader>os', '<cmd>ObsidianQuickSwitch<CR>', desc = 'Search notes in my vault and switch to selected'},
|
||||||
|
},
|
||||||
|
mappings = {
|
||||||
|
-- Overrides the 'gf' mapping to work on markdown/wiki links within your vault.
|
||||||
|
["gf"] = {
|
||||||
|
action = function()
|
||||||
|
return require("obsidian").util.gf_passthrough()
|
||||||
|
end,
|
||||||
|
opts = { noremap = false, expr = true, buffer = true },
|
||||||
|
},
|
||||||
|
-- Toggle check-boxes.
|
||||||
|
["<leader>ch"] = {
|
||||||
|
action = function()
|
||||||
|
return require("obsidian").util.toggle_checkbox()
|
||||||
|
end,
|
||||||
|
opts = { buffer = true },
|
||||||
|
},
|
||||||
|
-- Smart action depending on context, either follow link or toggle checkbox.
|
||||||
|
["<cr>"] = {
|
||||||
|
action = function()
|
||||||
|
return require("obsidian").util.smart_action()
|
||||||
|
end,
|
||||||
|
opts = { buffer = true, expr = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
workspaces = {
|
||||||
|
{
|
||||||
|
name = 'tech-work-hobby',
|
||||||
|
path = '/Users/rtim/Documents/Notes/tech-work-hobby/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
daily_notes = {
|
||||||
|
folder = 'Daily',
|
||||||
|
date_format = '%d-%b-%y (%A)',
|
||||||
|
default_tags = { 'daily' },
|
||||||
|
template = 'Daily.md',
|
||||||
|
},
|
||||||
|
templates = {
|
||||||
|
folder = 'Templates',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
@@ -10,6 +10,9 @@ return {
|
|||||||
},
|
},
|
||||||
keymaps = {
|
keymaps = {
|
||||||
['<C-h>'] = false,
|
['<C-h>'] = false,
|
||||||
|
['<C-j>'] = false,
|
||||||
|
['<C-k>'] = false,
|
||||||
|
['<C-l>'] = false,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
return {
|
|
||||||
"kylechui/nvim-surround",
|
|
||||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function()
|
|
||||||
require("nvim-surround").setup({
|
|
||||||
-- Configuration here, or leave empty to use defaults
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,12 @@ return {
|
|||||||
'FabianWirth/search.nvim',
|
'FabianWirth/search.nvim',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-lua/plenary.nvim',
|
'nvim-lua/plenary.nvim',
|
||||||
|
{
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
|
dependencies = {
|
||||||
|
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
@@ -19,15 +24,16 @@ return {
|
|||||||
vimgrep_arguments = vimgrep_arguments,
|
vimgrep_arguments = vimgrep_arguments,
|
||||||
file_ignore_patterns = {
|
file_ignore_patterns = {
|
||||||
'node_modules',
|
'node_modules',
|
||||||
|
'.git/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pickers = {
|
extensions = {
|
||||||
find_files = {
|
fzf = {}
|
||||||
find_command = { 'rg', '--files', '--hidden', '--glob', '!**/.git/*' },
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
telescope.load_extension('fzf')
|
||||||
|
|
||||||
local search = require('search')
|
local search = require('search')
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
'nvim-treesitter/nvim-treesitter',
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-treesitter.configs").setup({
|
require("nvim-treesitter.configs").setup({
|
||||||
@@ -28,3 +28,4 @@ return {
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
43
lua/crentist/lazy/ufo.lua
Normal file
43
lua/crentist/lazy/ufo.lua
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
return {
|
||||||
|
'kevinhwang91/nvim-ufo',
|
||||||
|
event = 'BufReadPost',
|
||||||
|
dependencies = {
|
||||||
|
'kevinhwang91/promise-async',
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
{
|
||||||
|
'luukvbaal/statuscol.nvim',
|
||||||
|
config = function()
|
||||||
|
local builtin = require('statuscol.builtin')
|
||||||
|
require('statuscol').setup({
|
||||||
|
relculright = true,
|
||||||
|
segments = {
|
||||||
|
{ text = { builtin.foldfunc }, sign = { colwidth = 2 }, click = 'v:lua.ScFa', },
|
||||||
|
{ text = { '%s' }, click = 'v:lua.ScSa', hl = 'FoldColumn' },
|
||||||
|
{ text = { builtin.lnumfunc, ' ' }, click = 'v:lua.ScLa', hl = 'FoldColumn' },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
},
|
||||||
|
init = function()
|
||||||
|
vim.opt.foldenable = true
|
||||||
|
vim.opt.foldcolumn = '1'
|
||||||
|
vim.opt.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
||||||
|
vim.opt.foldlevelstart = 99
|
||||||
|
vim.opt.fillchars = 'eob: ,fold: ,foldopen:,foldsep: ,foldclose:'
|
||||||
|
vim.opt.foldtext = ''
|
||||||
|
end,
|
||||||
|
opts = {
|
||||||
|
provider_selector = function(bufnr, filetype, buftype)
|
||||||
|
return { 'treesitter', 'indent' }
|
||||||
|
end
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('ufo').setup({
|
||||||
|
provider_selector = function(bufnr, filetype, buftype)
|
||||||
|
return { 'treesitter', 'indent' }
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
@@ -11,7 +11,9 @@ vim.keymap.set({ "i", "s" }, "<C-l>", function()
|
|||||||
end
|
end
|
||||||
end, { desc = "Snippet next argument", silent = true })
|
end, { desc = "Snippet next argument", silent = true })
|
||||||
|
|
||||||
-- nvim config
|
--------------------
|
||||||
|
-- Snippets for LUA
|
||||||
|
--------------------
|
||||||
ls.add_snippets('lua', {
|
ls.add_snippets('lua', {
|
||||||
s({ name = 'LuaSnip Snippet', trig = 'snipf' },
|
s({ name = 'LuaSnip Snippet', trig = 'snipf' },
|
||||||
fmt([[
|
fmt([[
|
||||||
@@ -44,7 +46,9 @@ ls.add_snippets('lua', {
|
|||||||
),
|
),
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Comment block
|
--------------------
|
||||||
|
-- Generic snippets
|
||||||
|
--------------------
|
||||||
local function com_string(_, snip, to_multiply)
|
local function com_string(_, snip, to_multiply)
|
||||||
local comment_string = vim.bo.commentstring
|
local comment_string = vim.bo.commentstring
|
||||||
local repeats = snip.captures[1]
|
local repeats = snip.captures[1]
|
||||||
@@ -78,3 +82,29 @@ ls.add_snippets('all', {
|
|||||||
),
|
),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
-- Terraform
|
||||||
|
--------------------
|
||||||
|
ls.add_snippets('terraform', {
|
||||||
|
s({ name = 'data_assume', trig = 'tf_assume' },
|
||||||
|
fmt([[
|
||||||
|
data "aws_iam_policy_document" "<name>" {
|
||||||
|
statement {
|
||||||
|
actions = ["sts:AssumeRole"]
|
||||||
|
|
||||||
|
principals {
|
||||||
|
type = "Service"
|
||||||
|
identifiers = ["<service>.amazonaws.com"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]],
|
||||||
|
{
|
||||||
|
name = i(1, 'assume'),
|
||||||
|
service = i(2, 'service')
|
||||||
|
},
|
||||||
|
{ delimiters = '<>' }
|
||||||
|
)
|
||||||
|
),
|
||||||
|
})
|
||||||
|
|
||||||
|
|||||||
3
lua/crentist/null-ls.lua
Normal file
3
lua/crentist/null-ls.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
-- https://www.youtube.com/watch?v=q-oBU2fO1H4&t=189s
|
||||||
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
@@ -5,6 +5,8 @@ vim.keymap.set("n", "<leader>pv", ":Oil<CR>")
|
|||||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>bc", ":bp|bd!#<CR>")
|
||||||
|
|
||||||
-- move selected blocks
|
-- move selected blocks
|
||||||
vim.keymap.set("v", "<S-J>", ":m '>+1<CR>gv=gv")
|
vim.keymap.set("v", "<S-J>", ":m '>+1<CR>gv=gv")
|
||||||
vim.keymap.set("v", "<S-K>", ":m '<-2<CR>gv=gv")
|
vim.keymap.set("v", "<S-K>", ":m '<-2<CR>gv=gv")
|
||||||
@@ -31,3 +33,10 @@ vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><
|
|||||||
|
|
||||||
vim.keymap.set("n", "<C-s>", "<cmd>silent !tmux neww tmux-sessionizer<CR>")
|
vim.keymap.set("n", "<C-s>", "<cmd>silent !tmux neww tmux-sessionizer<CR>")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader><leader>x", "<cmd>source %<CR>")
|
||||||
|
vim.keymap.set("n", "<leader>x", ":.lua<CR>")
|
||||||
|
vim.keymap.set("v", "<leader>x", ":lua<CR>")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<M-j>", "<cmd>cnext<CR>")
|
||||||
|
vim.keymap.set("n", "<M-k>", "<cmd>cprev<CR>")
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ vim.opt.incsearch = true
|
|||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
vim.opt.scrolloff = 8
|
vim.opt.scrolloff = 8
|
||||||
vim.opt.signcolumn = "yes"
|
vim.opt.signcolumn = "yes:1"
|
||||||
vim.opt.isfname:append("@-@")
|
vim.opt.isfname:append("@-@")
|
||||||
|
|
||||||
vim.opt.updatetime = 50
|
vim.opt.updatetime = 50
|
||||||
|
|||||||
Reference in New Issue
Block a user