I should probably make this a git repo
This commit is contained in:
1
lua/plugins/auto-pairs.lua
Normal file
1
lua/plugins/auto-pairs.lua
Normal file
@ -0,0 +1 @@
|
||||
return {} -- return {'jiangmiao/auto-pairs'}
|
11
lua/plugins/barbecue.lua
Normal file
11
lua/plugins/barbecue.lua
Normal file
@ -0,0 +1,11 @@
|
||||
return {
|
||||
"utilyre/barbecue.nvim",
|
||||
name = "barbecue",
|
||||
version = "*",
|
||||
event = { 'LspAttach' },
|
||||
dependencies = {
|
||||
"SmiteshP/nvim-navic",
|
||||
"nvim-tree/nvim-web-devicons", -- optional dependency
|
||||
},
|
||||
opts = {}
|
||||
}
|
1
lua/plugins/biscuit.lua
Normal file
1
lua/plugins/biscuit.lua
Normal file
@ -0,0 +1 @@
|
||||
return { 'Biscuit-Colorscheme/nvim', name = 'biscuit' }
|
6
lua/plugins/catppuccin-nvim.lua
Normal file
6
lua/plugins/catppuccin-nvim.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
'catppuccin/nvim',
|
||||
lazy=false,
|
||||
priority = 1000,
|
||||
}
|
||||
|
1
lua/plugins/everforest.lua
Normal file
1
lua/plugins/everforest.lua
Normal file
@ -0,0 +1 @@
|
||||
return {'sainnhe/everforest'}
|
55
lua/plugins/gitsigns.lua
Normal file
55
lua/plugins/gitsigns.lua
Normal file
@ -0,0 +1,55 @@
|
||||
return {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
event = { 'BufEnter' },
|
||||
config = function()
|
||||
require('gitsigns').setup {
|
||||
signs = {
|
||||
add = { text = '█' },
|
||||
change = { text = '█' },
|
||||
delete = { text = '█' },
|
||||
topdelete = { text = '█' },
|
||||
changedelete = { text = '█' },
|
||||
untracked = { text = '█' },
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = '█' },
|
||||
change = { text = '█' },
|
||||
delete = { text = '█' },
|
||||
topdelete = { text = '█' },
|
||||
changedelete = { text = '█' },
|
||||
untracked = { text = '█' },
|
||||
},
|
||||
signs_staged_enable = true,
|
||||
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
||||
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||
watch_gitdir = {
|
||||
follow_files = true
|
||||
},
|
||||
auto_attach = true,
|
||||
attach_to_untracked = false,
|
||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 1000,
|
||||
ignore_whitespace = false,
|
||||
virt_text_priority = 100,
|
||||
},
|
||||
current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
|
||||
sign_priority = 6,
|
||||
update_debounce = 100,
|
||||
status_formatter = nil, -- Use default
|
||||
max_file_length = 40000, -- Disable if file is longer than this (in lines)
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
border = 'single',
|
||||
style = 'minimal',
|
||||
relative = 'cursor',
|
||||
row = 0,
|
||||
col = 1
|
||||
},
|
||||
}
|
||||
end
|
||||
}
|
1
lua/plugins/gruvbox.lua
Normal file
1
lua/plugins/gruvbox.lua
Normal file
@ -0,0 +1 @@
|
||||
return { "ellisonleao/gruvbox.nvim", priority = 1000}
|
6
lua/plugins/hy.lua
Normal file
6
lua/plugins/hy.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
'hylang/vim-hy',
|
||||
config=function()
|
||||
vim.g.hy_enable_conceal = 1
|
||||
end
|
||||
}
|
7
lua/plugins/indent-blankline.lua
Normal file
7
lua/plugins/indent-blankline.lua
Normal file
@ -0,0 +1,7 @@
|
||||
return {
|
||||
-- "lukas-reineke/indent-blankline.nvim",
|
||||
-- main = "ibl",
|
||||
-- config = function()
|
||||
-- require("ibl").setup()
|
||||
-- end
|
||||
}
|
1
lua/plugins/mason-lspconfig.lua
Normal file
1
lua/plugins/mason-lspconfig.lua
Normal file
@ -0,0 +1 @@
|
||||
return {'williamboman/mason-lspconfig.nvim'}
|
7
lua/plugins/mason.lua
Normal file
7
lua/plugins/mason.lua
Normal file
@ -0,0 +1,7 @@
|
||||
return {
|
||||
'williamboman/mason.nvim',
|
||||
lazy = true,
|
||||
config = function()
|
||||
require('mason').setup()
|
||||
end
|
||||
}
|
1
lua/plugins/mini-files.lua
Normal file
1
lua/plugins/mini-files.lua
Normal file
@ -0,0 +1 @@
|
||||
return { 'echasnovski/mini.files', version = false }
|
1
lua/plugins/mini-notify.lua
Normal file
1
lua/plugins/mini-notify.lua
Normal file
@ -0,0 +1 @@
|
||||
return { 'echasnovski/mini.notify', version = false }
|
1
lua/plugins/mini-pairs.lua
Normal file
1
lua/plugins/mini-pairs.lua
Normal file
@ -0,0 +1 @@
|
||||
return { 'echasnovski/mini.pairs', version = false }
|
14
lua/plugins/neotree.lua
Normal file
14
lua/plugins/neotree.lua
Normal file
@ -0,0 +1,14 @@
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
event = { "VeryLazy" },
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||
},
|
||||
config = function()
|
||||
vim.api.nvim_set_keymap('n', '<leader><tab>', ':UndotreeHide<CR>:Neotree toggle<CR>', {})
|
||||
end
|
||||
}
|
1
lua/plugins/nui.lua
Normal file
1
lua/plugins/nui.lua
Normal file
@ -0,0 +1 @@
|
||||
return {'MunifTanjim/nui.nvim'}
|
210
lua/plugins/nvim-cmp.lua
Normal file
210
lua/plugins/nvim-cmp.lua
Normal file
@ -0,0 +1,210 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = { "InsertEnter" },
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer", -- source for text in buffer
|
||||
"hrsh7th/cmp-path", -- source for file system paths
|
||||
"L3MON4D3/LuaSnip", -- snippet engine
|
||||
"saadparwaiz1/cmp_luasnip", -- for autocompletion
|
||||
"rafamadriz/friendly-snippets", -- useful snippets
|
||||
"onsails/lspkind.nvim", -- vs-code like pictograms
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-omni",
|
||||
"hrsh7th/cmp-emoji",
|
||||
'hrsh7th/cmp-nvim-lsp-signature-help',
|
||||
'f3fora/cmp-spell',
|
||||
'hrsh7th/cmp-calc',
|
||||
'ray-x/cmp-treesitter',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
'tzachar/cmp-ai'
|
||||
},
|
||||
config = function()
|
||||
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
local cmp_status_ok, cmp = pcall(require, "cmp")
|
||||
if not cmp_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local snip_status_ok, luasnip = pcall(require, "luasnip")
|
||||
if not snip_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
require("luasnip/loaders/from_vscode").lazy_load()
|
||||
|
||||
local check_backspace = function()
|
||||
local col = vim.fn.col "." - 1
|
||||
return col == 0 or vim.fn.getline("."):sub(col, col):match "%s"
|
||||
end
|
||||
|
||||
local cmp_ai = require('cmp_ai.config')
|
||||
|
||||
cmp_ai:setup({
|
||||
max_lines = 100,
|
||||
provider = 'Ollama',
|
||||
provider_options = {
|
||||
model = 'codellama:7b-code',
|
||||
},
|
||||
notify = true,
|
||||
notify_callback = function(msg)
|
||||
vim.notify(msg)
|
||||
end,
|
||||
run_on_every_keystroke = false,
|
||||
ignored_file_types = {
|
||||
-- default is not to ignore
|
||||
-- uncomment to ignore in lua:
|
||||
-- lua = true
|
||||
},
|
||||
})
|
||||
|
||||
local kind_icons = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = " ",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = " ",
|
||||
Misc = " ",
|
||||
}
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body) -- For `luasnip` users.
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
["<C-k>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-j>"] = cmp.mapping.select_next_item(),
|
||||
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
|
||||
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
|
||||
["<C-Tab>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
|
||||
["<C-y>"] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
|
||||
["<C-e>"] = cmp.mapping {
|
||||
i = cmp.mapping.abort(),
|
||||
c = cmp.mapping.close(),
|
||||
},
|
||||
-- Accept currently selected item. If none selected, `select` first item.
|
||||
-- Set `select` to `false` to only confirm explicitly selected items.
|
||||
["<CR>"] = cmp.mapping.confirm { select = true },
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif check_backspace() then
|
||||
fallback()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
},
|
||||
formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = function(entry, vim_item)
|
||||
-- Kind icons
|
||||
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
||||
-- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind
|
||||
vim_item.menu = ({
|
||||
nvim_lsp = "[LSP]",
|
||||
luasnip = "[Snip]",
|
||||
buffer = "[Buf]",
|
||||
path = "[Path]",
|
||||
cmp_ai = '[AI]',
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
completion = {
|
||||
autocomplete = {
|
||||
require('cmp.types').cmp.TriggerEvent.TextChanged,
|
||||
},
|
||||
completeopt = 'menu,menuone,noselect',
|
||||
keyword_pattern = ".*",
|
||||
keyword_length = 1, -- Set to 1 for immediate as-you-type completion
|
||||
},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp_signature_help' },
|
||||
{ name = "nvim_lsp" },
|
||||
-- { name = 'cmp_ai' },
|
||||
{ name = "treesitter" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
{ name = "spell" },
|
||||
{ name = 'calc' },
|
||||
{ name = 'omni' },
|
||||
{ name = 'emoji' }
|
||||
},
|
||||
confirm_opts = {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = false,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = true,
|
||||
native_menu = false,
|
||||
},
|
||||
}
|
||||
|
||||
-- `/` cmdline setup.
|
||||
cmp.setup.cmdline('/', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- `:` cmdline setup.
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
5
lua/plugins/nvim-colorizer.lua
Normal file
5
lua/plugins/nvim-colorizer.lua
Normal file
@ -0,0 +1,5 @@
|
||||
return {
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = true,
|
||||
}
|
7
lua/plugins/nvim-emmet.lua
Normal file
7
lua/plugins/nvim-emmet.lua
Normal file
@ -0,0 +1,7 @@
|
||||
return {
|
||||
"olrtg/nvim-emmet",
|
||||
lazy=false,
|
||||
config = function()
|
||||
vim.keymap.set({ "n", "v" }, '<leader>xe', require('nvim-emmet').wrap_with_abbreviation)
|
||||
end,
|
||||
}
|
10
lua/plugins/nvim-lint.lua
Normal file
10
lua/plugins/nvim-lint.lua
Normal file
@ -0,0 +1,10 @@
|
||||
return {
|
||||
'mfussenegger/nvim-lint',
|
||||
event = { "VeryLazy" },
|
||||
config = function()
|
||||
require('lint').linters_by_ft = {
|
||||
markdown = {'vale',},
|
||||
python = {'pylint',},
|
||||
}
|
||||
end
|
||||
}
|
100
lua/plugins/nvim-lspconfig.lua
Normal file
100
lua/plugins/nvim-lspconfig.lua
Normal file
@ -0,0 +1,100 @@
|
||||
local function on_attach(client, bufnr)
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, {})
|
||||
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, {})
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {})
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, {})
|
||||
vim.keymap.set('n', 'gr', require('telescope.builtin').lsp_references, {})
|
||||
vim.keymap.set('n', '<C-l>h', vim.lsp.buf.hover, {})
|
||||
end
|
||||
|
||||
local servers = {
|
||||
'asm_lsp',
|
||||
'bashls',
|
||||
'clojure_lsp',
|
||||
'cmake',
|
||||
'cssls',
|
||||
'fennel_language_server',
|
||||
'html',
|
||||
'jqls',
|
||||
'jsonls',
|
||||
'pyright',
|
||||
'rust_analyzer',
|
||||
'clangd',
|
||||
'verible',
|
||||
'vimls',
|
||||
'luau_lsp',
|
||||
'lua_ls',
|
||||
'emmet_language_server',
|
||||
}
|
||||
|
||||
|
||||
local border = 'rounded'
|
||||
|
||||
local handlers = {
|
||||
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {border = border, focus = false}),
|
||||
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {border = border, focus = false}),
|
||||
}
|
||||
|
||||
-- vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||
-- group = vim.api.nvim_create_augroup("float_diagnostic", { clear = true }),
|
||||
-- callback = function ()
|
||||
-- vim.lsp.buf.hover(nil, {focus=false, scope='line'})
|
||||
-- end
|
||||
-- })
|
||||
|
||||
return {
|
||||
event={ "VeryLazy" },
|
||||
'neovim/nvim-lspconfig',
|
||||
config = function()
|
||||
local nvim_lsp = require('lspconfig')
|
||||
require('mason')
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = servers
|
||||
})
|
||||
for _, lsp in ipairs(servers) do
|
||||
local lsp_capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
if lsp ~= 'emmet-language-server' then
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
autostart = true,
|
||||
capabilities = lsp_capabilities,
|
||||
handlers = handlers,
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
}
|
||||
}
|
||||
else
|
||||
nvim_lsp.emmet_language_server.setup({
|
||||
filetypes = { "css", "eruby", "html", "javascript", "javascriptreact", "less", "sass", "scss", "pug", "typescriptreact" },
|
||||
-- Read more about this options in the [vscode docs](https://code.visualstudio.com/docs/editor/emmet#_emmet-configuration).
|
||||
-- **Note:** only the options listed in the table are supported.
|
||||
init_options = {
|
||||
---@type table<string, string>
|
||||
includeLanguages = {},
|
||||
--- @type string[]
|
||||
excludeLanguages = {},
|
||||
--- @type string[]
|
||||
extensionsPath = {},
|
||||
--- @type table<string, any> [Emmet Docs](https://docs.emmet.io/customization/preferences/)
|
||||
preferences = {},
|
||||
--- @type boolean Defaults to `true`
|
||||
showAbbreviationSuggestions = true,
|
||||
--- @type "always" | "never" Defaults to `"always"`
|
||||
showExpandedAbbreviation = "always",
|
||||
--- @type boolean Defaults to `false`
|
||||
showSuggestionsAsSnippets = false,
|
||||
--- @type table<string, any> [Emmet Docs](https://docs.emmet.io/customization/syntax-profiles/)
|
||||
syntaxProfiles = {},
|
||||
--- @type table<string, string> [Emmet Docs](https://docs.emmet.io/customization/snippets/#variables)
|
||||
variables = {},
|
||||
},
|
||||
})
|
||||
end
|
||||
end
|
||||
vim.cmd([[LspStart]])
|
||||
end
|
||||
}
|
||||
|
||||
|
51
lua/plugins/nvim-navic.lua
Normal file
51
lua/plugins/nvim-navic.lua
Normal file
@ -0,0 +1,51 @@
|
||||
return {
|
||||
'SmiteshP/nvim-navic',
|
||||
event = { 'LspAttach' },
|
||||
config = function()
|
||||
local navic = require('nvim-navic')
|
||||
navic.setup {
|
||||
icons = {
|
||||
File = ' ',
|
||||
Module = ' ',
|
||||
Namespace = ' ',
|
||||
Package = ' ',
|
||||
Class = ' ',
|
||||
Method = ' ',
|
||||
Property = ' ',
|
||||
Field = ' ',
|
||||
Constructor = ' ',
|
||||
Enum = ' ',
|
||||
Interface = ' ',
|
||||
Function = ' ',
|
||||
Variable = ' ',
|
||||
Constant = ' ',
|
||||
String = ' ',
|
||||
Number = ' ',
|
||||
Boolean = ' ',
|
||||
Array = ' ',
|
||||
Object = ' ',
|
||||
Key = ' ',
|
||||
Null = ' ',
|
||||
EnumMember = ' ',
|
||||
Struct = ' ',
|
||||
Event = ' ',
|
||||
Operator = ' ',
|
||||
TypeParameter = ' '
|
||||
},
|
||||
lsp = {
|
||||
auto_attach = true,
|
||||
preference = nil,
|
||||
},
|
||||
highlight = true,
|
||||
separator = " > ",
|
||||
depth_limit = 0,
|
||||
depth_limit_indicator = "..",
|
||||
safe_output = true,
|
||||
lazy_update_context = false,
|
||||
click = true,
|
||||
format_text = function(text)
|
||||
return text
|
||||
end,
|
||||
}
|
||||
end
|
||||
}
|
54
lua/plugins/nvim-telescope.lua
Normal file
54
lua/plugins/nvim-telescope.lua
Normal file
@ -0,0 +1,54 @@
|
||||
return {
|
||||
lazy = true,
|
||||
'nvim-telescope/telescope.nvim',
|
||||
tag = '0.1.4',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local actions = require("telescope.actions")
|
||||
local keymap = vim.api.nvim_set_keymap
|
||||
|
||||
require('telescope').setup({
|
||||
extensions = {
|
||||
media = {
|
||||
backend = "ueberzug",
|
||||
backend_options = {
|
||||
xmove = -1,
|
||||
ymove = -2,
|
||||
warnings = true,
|
||||
supress_backend_warning = false
|
||||
},
|
||||
}
|
||||
},
|
||||
defaults = {
|
||||
prompt_prefix = "λ ",
|
||||
selection_caret = "-> ",
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-h>"] = actions.which_key,
|
||||
["<C-k>"] = actions.move_selection_next,
|
||||
["<C-j>"] = actions.move_selection_previous,
|
||||
}
|
||||
}
|
||||
},
|
||||
pickers = {
|
||||
buffers = {
|
||||
sort_lastused = true,
|
||||
previewer = false,
|
||||
layout_config = {
|
||||
width = 0.3,
|
||||
height = 0.4,
|
||||
},
|
||||
},
|
||||
planets = {
|
||||
show_pluto = true,
|
||||
},
|
||||
},
|
||||
extensions = {}
|
||||
})
|
||||
keymap('n', '<leader><leader>', ':Telescope find_files<CR>', {})
|
||||
keymap('n', '<leader>m', ':Telescope media<CR>', {})
|
||||
keymap('n', '<leader>b', ':Telescope buffers<CR>', {})
|
||||
keymap('n', '<leader>t', ':Telescope<CR>', {})
|
||||
keymap('n', '<leader>g', ':Telescope live_grep<CR>', {})
|
||||
end,
|
||||
}
|
72
lua/plugins/nvim-treesitter.lua
Normal file
72
lua/plugins/nvim-treesitter.lua
Normal file
@ -0,0 +1,72 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "InsertEnter" },
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
config = function()
|
||||
-- import nvim-treesitter plugin
|
||||
local treesitter = require("nvim-treesitter.configs")
|
||||
|
||||
-- configure treesitter
|
||||
treesitter.setup({ -- enable syntax highlighting
|
||||
auto_install = true,
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
-- enable indentation
|
||||
indent = { enable = true },
|
||||
-- enable autotagging (w/ nvim-ts-autotag plugin)
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
-- ensure these language parsers are installed
|
||||
ensure_installed = {
|
||||
"json",
|
||||
"javascript",
|
||||
"yaml",
|
||||
"html",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"bash",
|
||||
"lua",
|
||||
"vim",
|
||||
"dockerfile",
|
||||
"gitignore",
|
||||
"query",
|
||||
"latex",
|
||||
"python",
|
||||
"c",
|
||||
"cpp",
|
||||
"css",
|
||||
"commonlisp",
|
||||
"fennel",
|
||||
"haskell",
|
||||
"ini",
|
||||
"jq",
|
||||
"perl",
|
||||
"scss",
|
||||
"verilog",
|
||||
"awk"
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
-- enable nvim-ts-context-commentstring plugin for commenting tsx and jsx
|
||||
context_commentstring = {
|
||||
enable = true,
|
||||
enable_autocmd = false,
|
||||
},
|
||||
})
|
||||
vim.api.nvim_set_keymap('n', '<space>jd', ':TSD<CR>', { noremap = true, silent = true })
|
||||
end,
|
||||
}
|
1
lua/plugins/oxocarbon.lua
Normal file
1
lua/plugins/oxocarbon.lua
Normal file
@ -0,0 +1 @@
|
||||
return { 'nyoom-engineering/oxocarbon.nvim' }
|
1
lua/plugins/rosepine.lua
Normal file
1
lua/plugins/rosepine.lua
Normal file
@ -0,0 +1 @@
|
||||
return { 'rose-pine/neovim', name = 'rose-pine' }
|
51
lua/plugins/tabby.lua
Normal file
51
lua/plugins/tabby.lua
Normal file
@ -0,0 +1,51 @@
|
||||
return {
|
||||
'nanozuki/tabby.nvim',
|
||||
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||
config = function()
|
||||
local theme = {
|
||||
fill = 'TabLineFill',
|
||||
-- Also you can do this: fill = { fg='#f2e9de', bg='#907aa9', style='italic' }
|
||||
head = 'TabLine',
|
||||
current_tab = 'tabActive',
|
||||
tab = 'TabLine',
|
||||
win = 'TabLine',
|
||||
tail = 'TabLine',
|
||||
}
|
||||
require('tabby').setup({
|
||||
line = function(line)
|
||||
return {
|
||||
{
|
||||
line.sep(' ', theme.head, theme.fill),
|
||||
},
|
||||
line.tabs().foreach(function(tab)
|
||||
local hl = tab.is_current() and theme.current_tab or theme.tab
|
||||
return {
|
||||
tab.number(),
|
||||
tab.name(),
|
||||
tab.close_btn(''),
|
||||
line.sep(' ', hl, theme.fill),
|
||||
hl = hl,
|
||||
margin = ' ',
|
||||
}
|
||||
end),
|
||||
line.spacer(),
|
||||
line.wins_in_tab(line.api.get_current_tab()).foreach(function(win)
|
||||
return {
|
||||
line.sep(' ', theme.win, theme.fill),
|
||||
win.buf_name(),
|
||||
line.sep(' ', theme.win, theme.fill),
|
||||
hl = theme.win,
|
||||
margin = ' ',
|
||||
}
|
||||
end),
|
||||
{
|
||||
line.sep(' ', theme.tail, theme.fill),
|
||||
{ '', hl = theme.tail },
|
||||
},
|
||||
hl = theme.fill,
|
||||
}
|
||||
end,
|
||||
-- option = {}, -- setup modules' option,
|
||||
})
|
||||
end,
|
||||
}
|
6
lua/plugins/tagbar.lua
Normal file
6
lua/plugins/tagbar.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
'preservim/tagbar',
|
||||
config = function()
|
||||
vim.keymap.set('n', '<leader>o', ':TagbarToggle<CR>', {})
|
||||
end
|
||||
}
|
7
lua/plugins/telescope-media.lua
Normal file
7
lua/plugins/telescope-media.lua
Normal file
@ -0,0 +1,7 @@
|
||||
return {
|
||||
"dharmx/telescope-media.nvim",
|
||||
event={ "VeryLazy" },
|
||||
config = function()
|
||||
require("telescope").load_extension("media")
|
||||
end,
|
||||
}
|
10
lua/plugins/toggleterm.lua
Normal file
10
lua/plugins/toggleterm.lua
Normal file
@ -0,0 +1,10 @@
|
||||
return {
|
||||
'akinsho/toggleterm.nvim',
|
||||
version = "*",
|
||||
event = { "VeryLazy" },
|
||||
config = function()
|
||||
require('toggleterm').setup({
|
||||
open_mapping = [[<c-\>]],
|
||||
})
|
||||
end
|
||||
}
|
16
lua/plugins/trouble.lua
Normal file
16
lua/plugins/trouble.lua
Normal file
@ -0,0 +1,16 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
event = { "LspAttach" },
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {
|
||||
signs = {
|
||||
-- icons / text used for a diagnostic
|
||||
error = "",
|
||||
warning = "",
|
||||
hint = "",
|
||||
information = "",
|
||||
other = "",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
6
lua/plugins/undotree.lua
Normal file
6
lua/plugins/undotree.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
'mbbill/undotree',
|
||||
config=function()
|
||||
vim.keymap.set('n', '<C-u>', ':Neotree close<CR>:UndotreeToggle<CR>', {})
|
||||
end,
|
||||
}
|
1
lua/plugins/vim-commentary.lua
Normal file
1
lua/plugins/vim-commentary.lua
Normal file
@ -0,0 +1 @@
|
||||
return {'tpope/vim-commentary'}
|
1
lua/plugins/vim-sleuth.lua
Normal file
1
lua/plugins/vim-sleuth.lua
Normal file
@ -0,0 +1 @@
|
||||
return { 'tpope/vim-sleuth', event = { 'BufEnter' }}
|
1
lua/plugins/vim-surround.lua
Normal file
1
lua/plugins/vim-surround.lua
Normal file
@ -0,0 +1 @@
|
||||
return {'tpope/vim-surround'}
|
8
lua/plugins/vimtex.lua
Normal file
8
lua/plugins/vimtex.lua
Normal file
@ -0,0 +1,8 @@
|
||||
return {
|
||||
'lervag/vimtex',
|
||||
config = function()
|
||||
vim.g.vimtex_view_method = 'zathura'
|
||||
vim.api.nvim_set_keymap('n', '<leader>ll', [[:VimtexCompile<CR>]], { noremap = true, silent = true })
|
||||
end,
|
||||
event = "FileType tex"
|
||||
}
|
Reference in New Issue
Block a user