update
This commit is contained in:
parent
f5daf0ad68
commit
0e500b7d8f
29 changed files with 687 additions and 694 deletions
38
lua/hsta/plugins/cmp.lua
Normal file
38
lua/hsta/plugins/cmp.lua
Normal file
|
@ -0,0 +1,38 @@
|
|||
return {
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
|
||||
version = "1.*",
|
||||
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
keymap = { preset = "default" },
|
||||
|
||||
appearance = {
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
|
||||
completion = { documentation = { auto_show = true } },
|
||||
|
||||
sources = {
|
||||
default = { "lsp", "path", "snippets", "buffer", "cmdline", "lazydev" },
|
||||
providers = {
|
||||
lazydev = {
|
||||
name = "LazyDev",
|
||||
module = "lazydev.integrations.blink",
|
||||
-- make lazydev completions top priority (see `:h blink.cmp`)
|
||||
score_offset = 100,
|
||||
},
|
||||
},
|
||||
},
|
||||
cmdline = {
|
||||
completion = { menu = { auto_show = true } },
|
||||
},
|
||||
|
||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||
},
|
||||
opts_extend = { "sources.default" },
|
||||
},
|
||||
}
|
54
lua/hsta/plugins/colors.lua
Normal file
54
lua/hsta/plugins/colors.lua
Normal file
|
@ -0,0 +1,54 @@
|
|||
return {
|
||||
{
|
||||
"EdenEast/nightfox.nvim",
|
||||
lazy = false,
|
||||
enabled = true,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("nightfox").setup({})
|
||||
|
||||
vim.cmd([[ colorscheme nightfox ]])
|
||||
end,
|
||||
},
|
||||
{
|
||||
"thesimonho/kanagawa-paper.nvim",
|
||||
lazy = false,
|
||||
enabled = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("kanagawa-paper").setup({})
|
||||
|
||||
vim.cmd([[ colorscheme kanagawa-paper ]])
|
||||
end,
|
||||
},
|
||||
{
|
||||
"savq/melange-nvim",
|
||||
lazy = false,
|
||||
enabled = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
vim.cmd([[ colorscheme melange ]])
|
||||
end,
|
||||
},
|
||||
{
|
||||
"maxmx03/solarized.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
enabled = false,
|
||||
---@type solarized.config
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
vim.o.termguicolors = true
|
||||
require("solarized").setup(opts)
|
||||
vim.cmd.colorscheme("solarized")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"rose-pine/neovim",
|
||||
name = "rose-pine",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
enabled = false,
|
||||
config = function() end,
|
||||
},
|
||||
}
|
52
lua/hsta/plugins/keybinds.lua
Normal file
52
lua/hsta/plugins/keybinds.lua
Normal file
|
@ -0,0 +1,52 @@
|
|||
return {
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
keys = {
|
||||
{
|
||||
"<leader>\\",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
{
|
||||
"K",
|
||||
":m '<-2<CR>gv=gv",
|
||||
mode = "v",
|
||||
},
|
||||
{
|
||||
"J",
|
||||
":m '>+1<CR>gv=gv",
|
||||
mode = "v",
|
||||
},
|
||||
{
|
||||
"<C-d>",
|
||||
"<C-d>zz",
|
||||
desc = "Half page jump center",
|
||||
},
|
||||
{
|
||||
"<C-u>",
|
||||
"<C-u>zz",
|
||||
desc = "Half page jump center",
|
||||
},
|
||||
{
|
||||
"<leader>p",
|
||||
'"_dP',
|
||||
desc = "Stolen from prime",
|
||||
mode = "x",
|
||||
},
|
||||
{
|
||||
"<leader>nn",
|
||||
":cnext<CR>",
|
||||
desc = "Next quickfix list item",
|
||||
},
|
||||
{
|
||||
"<leader>-",
|
||||
":tabclose<CR>",
|
||||
desc = "Close this tab",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
13
lua/hsta/plugins/lazydev.lua
Normal file
13
lua/hsta/plugins/lazydev.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
{
|
||||
"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" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
61
lua/hsta/plugins/lsp.lua
Normal file
61
lua/hsta/plugins/lsp.lua
Normal file
|
@ -0,0 +1,61 @@
|
|||
return {
|
||||
-- Buffer format on save
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
config = function()
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "isort", "black" },
|
||||
rust = { "rustfmt", lsp_format = "fallback" },
|
||||
javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
cpp = { "clang-format" },
|
||||
},
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 500,
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- Automatic LSP setup
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
tag = "v1.32.0",
|
||||
dependencies = { "williamboman/mason.nvim", "neovim/nvim-lspconfig" },
|
||||
lazy = false,
|
||||
keys = {
|
||||
{
|
||||
"ca",
|
||||
vim.lsp.buf.code_action,
|
||||
desc = "LSP: [C]ode Action",
|
||||
},
|
||||
{
|
||||
"<leader>rr",
|
||||
vim.lsp.buf.rename,
|
||||
desc = "LSP rename",
|
||||
},
|
||||
{
|
||||
"<leader>lh",
|
||||
vim.lsp.buf.hover,
|
||||
desc = "[L]sp: Hover",
|
||||
},
|
||||
},
|
||||
|
||||
config = function()
|
||||
require("mason").setup({})
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
automatic_installation = true,
|
||||
ensure_installed = { "lua_ls", "rust_analyzer", "clangd", "cmake" },
|
||||
})
|
||||
|
||||
require("mason-lspconfig").setup_handlers({
|
||||
function(server_name)
|
||||
require("lspconfig")[server_name].setup({})
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
51
lua/hsta/plugins/mini.lua
Normal file
51
lua/hsta/plugins/mini.lua
Normal file
|
@ -0,0 +1,51 @@
|
|||
return {
|
||||
{
|
||||
"echasnovski/mini.nvim",
|
||||
version = "*",
|
||||
lazy = false,
|
||||
keys = {
|
||||
{
|
||||
"<leader>=",
|
||||
function()
|
||||
require("mini.bufremove").delete()
|
||||
end,
|
||||
desc = "Delete buffer",
|
||||
},
|
||||
{
|
||||
"<leader>[",
|
||||
":bprev<CR>",
|
||||
desc = "Goto previous buffer",
|
||||
},
|
||||
{
|
||||
"<leader>]",
|
||||
":bnext<CR>",
|
||||
desc = "Goto next buffer",
|
||||
},
|
||||
{
|
||||
"<leader>;",
|
||||
":tabprevious<CR>",
|
||||
desc = "Goto previous tab",
|
||||
},
|
||||
{
|
||||
"<leader>'",
|
||||
":tabnext<CR>",
|
||||
desc = "Goto next tab",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("mini.ai").setup()
|
||||
require("mini.icons").setup()
|
||||
|
||||
require("mini.sessions").setup({
|
||||
autoread = true,
|
||||
})
|
||||
|
||||
require("mini.starter").setup({})
|
||||
require("mini.tabline").setup({})
|
||||
require("mini.statusline").setup({})
|
||||
require("mini.notify").setup({})
|
||||
require("mini.git").setup()
|
||||
require("mini.bufremove").setup()
|
||||
end,
|
||||
},
|
||||
}
|
17
lua/hsta/plugins/snacks.lua
Normal file
17
lua/hsta/plugins/snacks.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
return {
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
enabled = false,
|
||||
---@type snacks.Config
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
bigfile = { enabled = true },
|
||||
dashboard = { enabled = true },
|
||||
notifier = { enabled = true },
|
||||
},
|
||||
},
|
||||
}
|
98
lua/hsta/plugins/telescope.lua
Normal file
98
lua/hsta/plugins/telescope.lua
Normal file
|
@ -0,0 +1,98 @@
|
|||
return {
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release",
|
||||
},
|
||||
{ "tiagovla/scope.nvim", config = true },
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.8",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>dd",
|
||||
function()
|
||||
require("telescope.builtin").diagnostics()
|
||||
end,
|
||||
desc = "[D]iagnostics",
|
||||
},
|
||||
{
|
||||
"gd",
|
||||
function()
|
||||
require("telescope.builtin").lsp_definitions()
|
||||
end,
|
||||
desc = "LSP def",
|
||||
},
|
||||
{
|
||||
"gr",
|
||||
function()
|
||||
require("telescope.builtin").lsp_references()
|
||||
end,
|
||||
desc = "[L]SP, Find [R]eferences",
|
||||
},
|
||||
{
|
||||
"<leader>ws",
|
||||
function()
|
||||
require("telescope.builtin").lsp_workspace_symbols()
|
||||
end,
|
||||
desc = "LSP, [W]orkspace [S]ymbols",
|
||||
},
|
||||
{
|
||||
"gi",
|
||||
function()
|
||||
require("telescope.builtin").lsp_implementations()
|
||||
end,
|
||||
desc = "[L]sp, [I]mplementations",
|
||||
},
|
||||
{
|
||||
"gt",
|
||||
function()
|
||||
require("telescope.builtin").lsp_type_definitions()
|
||||
end,
|
||||
desc = "[L]SP, Type Definitions",
|
||||
},
|
||||
{
|
||||
"<leader>ff",
|
||||
function()
|
||||
local builtin = require("telescope.builtin")
|
||||
builtin.find_files()
|
||||
end,
|
||||
desc = "Telescope: Find files",
|
||||
},
|
||||
{
|
||||
"<leader>q",
|
||||
":Telescope scope buffers<CR>",
|
||||
desc = "Telescope: find buffers",
|
||||
},
|
||||
{
|
||||
"<leader>fg",
|
||||
function()
|
||||
local builtin = require("telescope.builtin")
|
||||
builtin.live_grep()
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
telescope.setup({
|
||||
pickers = {},
|
||||
defaults = {
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
preview_cutoff = 0,
|
||||
},
|
||||
},
|
||||
|
||||
mappings = {
|
||||
i = { ["<c-d>"] = require("telescope.actions").delete_buffer },
|
||||
n = { ["<c-d>"] = require("telescope.actions").delete_buffer },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("telescope").load_extension("fzf")
|
||||
require("telescope").load_extension("scope")
|
||||
end,
|
||||
},
|
||||
}
|
32
lua/hsta/plugins/treesitter.lua
Normal file
32
lua/hsta/plugins/treesitter.lua
Normal file
|
@ -0,0 +1,32 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"markdown",
|
||||
"json",
|
||||
"javascript",
|
||||
"html",
|
||||
"c",
|
||||
"cpp",
|
||||
"hlsl",
|
||||
"jsdoc",
|
||||
"rust",
|
||||
"python",
|
||||
"bash",
|
||||
"zig",
|
||||
},
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue