Compare commits
10 Commits
d91c167d6e
...
v1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 2338b310f2 | |||
| 758322bd93 | |||
| 1a2df25f5e | |||
| aac1e91dcb | |||
| 6d91d0c963 | |||
| a33c92ce5b | |||
| 4053addac9 | |||
| 751829deb0 | |||
| c0adfd43a1 | |||
| 69067d5410 |
6
after/ftplugin/terraform.lua
Normal file
6
after/ftplugin/terraform.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
vim.opt.colorcolumn = "95"
|
||||||
|
vim.opt.shiftwidth = 2
|
||||||
|
vim.opt.tabstop = 2
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.bo.commentstring = '# %s'
|
||||||
|
|
||||||
@@ -1,41 +1,43 @@
|
|||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" },
|
"LuaSnip": { "branch": "master", "commit": "45db5addf8d0a201e1cf247cae4cdce605ad3768" },
|
||||||
"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-dotenv": { "branch": "main", "commit": "4dd53aab60982f1f75848aec5e6214986263325e" },
|
"cmp-dotenv": { "branch": "main", "commit": "4dd53aab60982f1f75848aec5e6214986263325e" },
|
||||||
"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" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
|
"dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
|
"fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" },
|
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
|
||||||
"git-blame.nvim": { "branch": "master", "commit": "408d5487d908dfe5d48e5645d8b27ddcc16b11e0" },
|
"git-blame.nvim": { "branch": "master", "commit": "50543e3993f4b996eea01ff5ccc8fe2a354c5388" },
|
||||||
"gruvbox.nvim": { "branch": "main", "commit": "a7cacf59418a6fe52da3d022bfd76a8caf34dc8d" },
|
"gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" },
|
||||||
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
|
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
|
||||||
"hererocks": { "branch": "master", "commit": "8bd2fcfdd65cfa7535ce39ea372a63b0bdb8e528" },
|
"hererocks": { "branch": "master", "commit": "8bd2fcfdd65cfa7535ce39ea372a63b0bdb8e528" },
|
||||||
"icon-picker.nvim": { "branch": "master", "commit": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3" },
|
"icon-picker.nvim": { "branch": "master", "commit": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "1fad61712bd3937dda925775a7736b8efbcbf1a7" },
|
"lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"neodev.nvim": { "branch": "main", "commit": "02893eeb9d6e8503817bd52385e111cba9a90500" },
|
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
|
"nvim-autopairs": { "branch": "master", "commit": "fd2badc24e675f947162a16c124d395bde80dbd6" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
|
"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": "7edfd6692ba17f8d4fe08d84142781898ab0a672" },
|
"nvim-lspconfig": { "branch": "master", "commit": "bdbc65aadc708ce528efb22bca5f82a7cca6b54d" },
|
||||||
|
"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-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "7ff0b8d3d21b15eb7231fcbd2acfded8987f5efd" },
|
"nvim-treesitter": { "branch": "master", "commit": "00f128dd73086aa578dc3d9142de06c633b7c685" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
|
"nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" },
|
||||||
"oil.nvim": { "branch": "master", "commit": "65c53dbe4f2140236590a7568a5f22a77d16be39" },
|
"oil.nvim": { "branch": "master", "commit": "1fe476daf0b3c108cb8ee1fc1226cc282fa2c9c1" },
|
||||||
"plenary": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
"plenary": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
|
||||||
"search.nvim": { "branch": "main", "commit": "7b8f2315d031be73e14bc2d82386dfac15952614" },
|
"search.nvim": { "branch": "main", "commit": "7b8f2315d031be73e14bc2d82386dfac15952614" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "7bd2f9b72f8449780b79bcf351534e2cd36ec43a" },
|
"telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "e5d0e04121c662ce29190a57dd03655d43c59d44" },
|
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
|
||||||
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
||||||
"vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" },
|
"vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" },
|
||||||
"vim-fugitive": { "branch": "master", "commit": "d0c1a437536778bcc8174b7cb2ffdf98f611e6fe" },
|
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
|
||||||
"vim-gitgutter": { "branch": "main", "commit": "e801371917e52805a4ceb1e93f55ed1fba712f82" }
|
"vim-gitgutter": { "branch": "main", "commit": "7b0b5098e3e57be86bb96cfbf2b8902381eef57c" },
|
||||||
}
|
"vim-helm": { "branch": "master", "commit": "ae1ebc160d2b9b90108477ab10df7a4fc501e358" }
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
["tf"] = "terraform",
|
||||||
|
},
|
||||||
pattern = {
|
pattern = {
|
||||||
[".*/playbooks/.*%.ya?ml"] = "yaml.ansible",
|
[".*/playbooks/.*%.ya?ml"] = "yaml.ansible",
|
||||||
[".*/roles/.*%.ya?ml"] = "yaml.ansible",
|
[".*/roles/.*%.ya?ml"] = "yaml.ansible",
|
||||||
|
|||||||
@@ -7,8 +7,28 @@ return {
|
|||||||
|
|
||||||
harpoon:setup()
|
harpoon:setup()
|
||||||
|
|
||||||
|
-- basic telescope configuration
|
||||||
|
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
|
||||||
|
|
||||||
|
require("telescope.pickers").new({}, {
|
||||||
|
prompt_title = "Harpoon",
|
||||||
|
finder = require("telescope.finders").new_table({
|
||||||
|
results = file_paths,
|
||||||
|
}),
|
||||||
|
previewer = conf.file_previewer({}),
|
||||||
|
sorter = conf.generic_sorter({}),
|
||||||
|
}):find()
|
||||||
|
end
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
|
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
|
||||||
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||||
|
vim.keymap.set("n", "<leader><C-e>", function() toggle_telescope(harpoon:list()) end,
|
||||||
|
{ desc = "Open harpoon window" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
|
vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
|
||||||
vim.keymap.set("n", "<C-j>", function() harpoon:list():select(2) end)
|
vim.keymap.set("n", "<C-j>", function() harpoon:list():select(2) end)
|
||||||
@@ -16,3 +36,4 @@ return {
|
|||||||
vim.keymap.set("n", "<C-l>", function() harpoon:list():select(4) end)
|
vim.keymap.set("n", "<C-l>", function() harpoon:list():select(4) end)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
return {
|
return {
|
||||||
"neovim/nvim-lspconfig",
|
'neovim/nvim-lspconfig',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"williamboman/mason.nvim",
|
'williamboman/mason.nvim',
|
||||||
"williamboman/mason-lspconfig.nvim",
|
'williamboman/mason-lspconfig.nvim',
|
||||||
"hrsh7th/nvim-cmp",
|
'hrsh7th/nvim-cmp',
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
"hrsh7th/cmp-buffer",
|
'hrsh7th/cmp-buffer',
|
||||||
"hrsh7th/cmp-path",
|
'hrsh7th/cmp-path',
|
||||||
"SergioRibera/cmp-dotenv",
|
'SergioRibera/cmp-dotenv',
|
||||||
"hrsh7th/cmp-cmdline",
|
'hrsh7th/cmp-cmdline',
|
||||||
"saadparwaiz1/cmp_luasnip",
|
'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' },
|
||||||
},
|
},
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
@@ -29,10 +30,26 @@ return {
|
|||||||
require('mason-lspconfig').setup({
|
require('mason-lspconfig').setup({
|
||||||
-- Replace the language servers listed here
|
-- Replace the language servers listed here
|
||||||
-- with the ones you want to install
|
-- with the ones you want to install
|
||||||
ensure_installed = { 'tsserver', 'lua_ls', 'gopls', 'pylsp', 'gitlab_ci_ls', 'yamlls', 'ansiblels', 'terraformls' },
|
ensure_installed = {
|
||||||
|
'tsserver',
|
||||||
|
'lua_ls',
|
||||||
|
'gopls',
|
||||||
|
'pylsp',
|
||||||
|
'gitlab_ci_ls',
|
||||||
|
'yamlls',
|
||||||
|
'ansiblels',
|
||||||
|
'terraformls',
|
||||||
|
'helm_ls'
|
||||||
|
},
|
||||||
handlers = {
|
handlers = {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
require('lspconfig')[server_name].setup({})
|
if server_name == 'tsserver' then
|
||||||
|
server_name = 'ts_ls'
|
||||||
|
end
|
||||||
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
require('lspconfig')[server_name].setup({
|
||||||
|
capabilities = capabilities
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -40,13 +57,12 @@ return {
|
|||||||
sources = {
|
sources = {
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'dotenv' },
|
|
||||||
{ name = 'luasnip', keyword_length = 2 },
|
{ name = 'luasnip', keyword_length = 2 },
|
||||||
{ name = 'buffer', keyword_length = 3 },
|
{ name = 'buffer', keyword_length = 3 },
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
-- `Enter` key to confirm completion
|
-- `Enter` key to confirm completion
|
||||||
["<CR>"] = cmp.mapping({
|
['<CR>'] = cmp.mapping({
|
||||||
i = function(fallback)
|
i = function(fallback)
|
||||||
if cmp.visible() and cmp.get_active_entry() then
|
if cmp.visible() and cmp.get_active_entry() then
|
||||||
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
|
cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false })
|
||||||
@@ -57,7 +73,7 @@ return {
|
|||||||
s = cmp.mapping.confirm({ select = true }),
|
s = cmp.mapping.confirm({ select = true }),
|
||||||
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
||||||
}),
|
}),
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
['<Tab>'] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
elseif luasnip.locally_jumpable(1) then
|
elseif luasnip.locally_jumpable(1) then
|
||||||
@@ -65,9 +81,9 @@ return {
|
|||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, { "i", "s" }),
|
end, { 'i', 's' }),
|
||||||
|
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item()
|
cmp.select_prev_item()
|
||||||
elseif luasnip.locally_jumpable(-1) then
|
elseif luasnip.locally_jumpable(-1) then
|
||||||
@@ -75,7 +91,7 @@ return {
|
|||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, { "i", "s" }),
|
end, { 'i', 's' }),
|
||||||
|
|
||||||
-- Ctrl+Space to trigger completion menu
|
-- Ctrl+Space to trigger completion menu
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
@@ -98,6 +114,7 @@ return {
|
|||||||
pylsp = {
|
pylsp = {
|
||||||
plugins = {
|
plugins = {
|
||||||
pycodestyle = {
|
pycodestyle = {
|
||||||
|
ignore = { 'W391' },
|
||||||
maxLineLength = pythonLineLength
|
maxLineLength = pythonLineLength
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -125,11 +142,11 @@ return {
|
|||||||
library = {
|
library = {
|
||||||
vim.env.VIMRUNTIME
|
vim.env.VIMRUNTIME
|
||||||
-- Depending on the usage, you might want to add additional paths here.
|
-- Depending on the usage, you might want to add additional paths here.
|
||||||
-- "${3rd}/luv/library"
|
-- '${3rd}/luv/library'
|
||||||
-- "${3rd}/busted/library",
|
-- '${3rd}/busted/library',
|
||||||
}
|
}
|
||||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
||||||
-- library = vim.api.nvim_get_runtime_file("", true)
|
-- library = vim.api.nvim_get_runtime_file('', true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
@@ -137,6 +154,18 @@ return {
|
|||||||
Lua = {}
|
Lua = {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lspconfig.helm_ls.setup {
|
||||||
|
settings = {
|
||||||
|
['helm-ls'] = {
|
||||||
|
yamlls = {
|
||||||
|
path = 'yaml-language-server',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lspconfig.terraformls.setup {
|
||||||
|
filetypes = { 'terraform', 'terraform-vars', 'tf' }
|
||||||
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
return {
|
return {
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
dependencies = { 'nvim-tree/nvim-web-devicons', branch = 'master' },
|
dependencies = {
|
||||||
|
{ 'nvim-tree/nvim-web-devicons', branch = 'master', },
|
||||||
|
'SmiteshP/nvim-navic',
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local colors = {
|
local colors = {
|
||||||
black = '#282828',
|
black = '#282828',
|
||||||
@@ -51,16 +54,16 @@ return {
|
|||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
'filename',
|
{
|
||||||
function()
|
'filename',
|
||||||
return require("nvim-treesitter").statusline({
|
path = 4,
|
||||||
indicator_size = 70,
|
},
|
||||||
type_patterns = { "class", "function", "method" },
|
{
|
||||||
separator = " -> ",
|
'navic',
|
||||||
})
|
},
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
15
lua/crentist/lazy/navic.lua
Normal file
15
lua/crentist/lazy/navic.lua
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
return {
|
||||||
|
'SmiteshP/nvim-navic',
|
||||||
|
dependencies = {
|
||||||
|
'neovim/nvim-lspconfig'
|
||||||
|
},
|
||||||
|
config = function ()
|
||||||
|
local navic = require('nvim-navic')
|
||||||
|
navic.setup({
|
||||||
|
lsp = {
|
||||||
|
auto_attach = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,31 +1,31 @@
|
|||||||
return {
|
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',
|
||||||
},
|
},
|
||||||
|
|
||||||
version = "0.1.6",
|
version = '0.1.6',
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
local telescope = require('telescope')
|
local telescope = require('telescope')
|
||||||
local telescopeConfig = require('telescope.config')
|
local telescopeConfig = require('telescope.config')
|
||||||
|
|
||||||
local vimgrep_arguments = { unpack(telescopeConfig.values.vimgrep_arguments) }
|
local vimgrep_arguments = { unpack(telescopeConfig.values.vimgrep_arguments) }
|
||||||
table.insert(vimgrep_arguments, "--hidden")
|
table.insert(vimgrep_arguments, '--hidden')
|
||||||
table.insert(vimgrep_arguments, "--glob")
|
table.insert(vimgrep_arguments, '--glob')
|
||||||
table.insert(vimgrep_arguments, "!**/.git/*")
|
table.insert(vimgrep_arguments, '!**/.git/*')
|
||||||
|
|
||||||
telescope.setup({
|
telescope.setup({
|
||||||
defaults = {
|
defaults = {
|
||||||
vimgrep_arguments = vimgrep_arguments,
|
vimgrep_arguments = vimgrep_arguments,
|
||||||
file_ignore_patterns = {
|
file_ignore_patterns = {
|
||||||
"node_modules",
|
'node_modules',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pickers = {
|
pickers = {
|
||||||
find_files = {
|
find_files = {
|
||||||
find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" },
|
find_command = { 'rg', '--files', '--hidden', '--glob', '!**/.git/*' },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -45,7 +45,7 @@ return {
|
|||||||
},
|
},
|
||||||
append_tabs = { -- append_tabs will add the provided tabs to the default ones
|
append_tabs = { -- append_tabs will add the provided tabs to the default ones
|
||||||
{
|
{
|
||||||
'Commits', -- or name = "Commits"
|
'Commits', -- or name = 'Commits'
|
||||||
builtin.git_commits, -- or tele_func = require('telescope.builtin').git_commits
|
builtin.git_commits, -- or tele_func = require('telescope.builtin').git_commits
|
||||||
available = function() -- optional
|
available = function() -- optional
|
||||||
return vim.fn.isdirectory('.git') == 1
|
return vim.fn.isdirectory('.git') == 1
|
||||||
@@ -59,16 +59,17 @@ return {
|
|||||||
search.open({ tab_name = 'Buffers' })
|
search.open({ tab_name = 'Buffers' })
|
||||||
end)
|
end)
|
||||||
vim.keymap.set('n', '<leader>pws', function()
|
vim.keymap.set('n', '<leader>pws', function()
|
||||||
local word = vim.fn.expand("<cword>")
|
local word = vim.fn.expand('<cword>')
|
||||||
builtin.grep_string({ search = word })
|
builtin.grep_string({ search = word })
|
||||||
end)
|
end)
|
||||||
vim.keymap.set('n', '<leader>pWs', function()
|
vim.keymap.set('n', '<leader>pWs', function()
|
||||||
local word = vim.fn.expand("<cWORD>")
|
local word = vim.fn.expand('<cWORD>')
|
||||||
builtin.grep_string({ search = word })
|
builtin.grep_string({ search = word })
|
||||||
end)
|
end)
|
||||||
vim.keymap.set('n', '<leader>ps', function()
|
vim.keymap.set('n', '<leader>ps', function()
|
||||||
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
builtin.grep_string({ search = vim.fn.input('Grep > ') })
|
||||||
end)
|
end)
|
||||||
vim.keymap.set('n', '<leader>vh', builtin.help_tags, {})
|
vim.keymap.set('n', '<leader>vh', builtin.help_tags, {})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,21 @@
|
|||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.keymap.set("n", "<leader>pv", ":Oil .<CR>")
|
vim.keymap.set("n", "<leader>pv", ":Oil .<CR>")
|
||||||
|
|
||||||
-- move selected blocks
|
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||||
|
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||||
|
|
||||||
|
-- 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")
|
||||||
|
|
||||||
-- keep cursor on J
|
-- keep cursor on J
|
||||||
vim.keymap.set("n", "J", "mzJ`z")
|
vim.keymap.set("n", "J", "mzJ`z")
|
||||||
-- keep search in the middle
|
-- keep search in the middle
|
||||||
vim.keymap.set("n", "n", "nzzzv")
|
vim.keymap.set("n", "n", "nzzzv")
|
||||||
vim.keymap.set("n", "N", "Nzzzv")
|
vim.keymap.set("n", "N", "Nzzzv")
|
||||||
|
|
||||||
-- greatest remap ever
|
-- greatest remap ever
|
||||||
-- save register on pasting
|
-- save register on pasting
|
||||||
vim.keymap.set("x", "<leader>p", [["_dP]])
|
vim.keymap.set("x", "<leader>p", [["_dP]])
|
||||||
|
|
||||||
-- next greatest remap ever : asbjornHaland
|
-- next greatest remap ever : asbjornHaland
|
||||||
@@ -24,3 +27,6 @@ vim.keymap.set({"n", "v"}, "<leader>d", [["_d]])
|
|||||||
vim.keymap.set("n", "Q", "<nop>")
|
vim.keymap.set("n", "Q", "<nop>")
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
|
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-s>", "<cmd>silent !tmux neww tmux-sessionizer<CR>")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user