mirror of
https://github.com/tjdevries/advent-of-nvim.git
synced 2025-12-21 16:41:14 +00:00
sorry, i forgot to update this more regularly
This commit is contained in:
19
nvim/lua/config/plugins/completion.lua
Normal file
19
nvim/lua/config/plugins/completion.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
{
|
||||
'saghen/blink.cmp',
|
||||
dependencies = 'rafamadriz/friendly-snippets',
|
||||
|
||||
version = 'v0.*',
|
||||
|
||||
opts = {
|
||||
keymap = { preset = 'default' },
|
||||
|
||||
appearance = {
|
||||
use_nvim_cmp_as_default = true,
|
||||
nerd_font_variant = 'mono'
|
||||
},
|
||||
|
||||
signature = { enabled = true }
|
||||
},
|
||||
},
|
||||
}
|
||||
37
nvim/lua/config/plugins/lsp.lua
Normal file
37
nvim/lua/config/plugins/lsp.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
'saghen/blink.cmp',
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
opts = {
|
||||
library = {
|
||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||
require("lspconfig").lua_ls.setup { capabilites = capabilities }
|
||||
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
callback = function(args)
|
||||
local c = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
if not c then return end
|
||||
|
||||
if vim.bo.filetype == "lua" then
|
||||
-- Format the current buffer on save
|
||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
buffer = args.buf,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ bufnr = args.buf, id = c.id })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
11
nvim/lua/config/plugins/mini.lua
Normal file
11
nvim/lua/config/plugins/mini.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
-- lua/custom/plugins/mini.lua
|
||||
return {
|
||||
{
|
||||
'echasnovski/mini.nvim',
|
||||
enabled = true,
|
||||
config = function()
|
||||
local statusline = require 'mini.statusline'
|
||||
statusline.setup { use_icons = true }
|
||||
end
|
||||
},
|
||||
}
|
||||
11
nvim/lua/config/plugins/oil.lua
Normal file
11
nvim/lua/config/plugins/oil.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
{
|
||||
'stevearc/oil.nvim',
|
||||
---@module 'oil'
|
||||
---@type oil.SetupOpts
|
||||
opts = {},
|
||||
-- Optional dependencies
|
||||
dependencies = { { "echasnovski/mini.icons", opts = {} } },
|
||||
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons
|
||||
}
|
||||
}
|
||||
39
nvim/lua/config/plugins/telescope.lua
Normal file
39
nvim/lua/config/plugins/telescope.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
return {
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
tag = '0.1.8',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }
|
||||
},
|
||||
config = function()
|
||||
require('telescope').setup {
|
||||
pickers = {
|
||||
find_files = {
|
||||
theme = "ivy"
|
||||
}
|
||||
},
|
||||
extensions = {
|
||||
fzf = {}
|
||||
}
|
||||
}
|
||||
|
||||
require('telescope').load_extension('fzf')
|
||||
|
||||
vim.keymap.set("n", "<space>fh", require('telescope.builtin').help_tags)
|
||||
vim.keymap.set("n", "<space>fd", require('telescope.builtin').find_files)
|
||||
vim.keymap.set("n", "<space>en", function()
|
||||
require('telescope.builtin').find_files {
|
||||
cwd = vim.fn.stdpath("config")
|
||||
}
|
||||
end)
|
||||
vim.keymap.set("n", "<space>ep", function()
|
||||
require('telescope.builtin').find_files {
|
||||
cwd = vim.fs.joinpath(vim.fn.stdpath("data"), "lazy")
|
||||
}
|
||||
end)
|
||||
|
||||
require "config.telescope.multigrep".setup()
|
||||
end
|
||||
}
|
||||
}
|
||||
23
nvim/lua/config/plugins/treesitter.lua
Normal file
23
nvim/lua/config/plugins/treesitter.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline" },
|
||||
auto_install = false,
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = function(lang, buf)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user