first commit
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
opts = {},
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
"saghen/blink.cmp",
|
||||
dependencies = "rafamadriz/friendly-snippets",
|
||||
version = "*",
|
||||
event = "InsertEnter",
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
keymap = { preset = "enter" },
|
||||
appearance = {
|
||||
use_nvim_cmp_as_default = false,
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
sources = {
|
||||
default = { "lsp", "path", "snippets", "buffer" },
|
||||
},
|
||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||
},
|
||||
opts_extend = { "sources.default" },
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
'akinsho/bufferline.nvim',
|
||||
version = "*",
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
lazy = false,
|
||||
opts = {},
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
keys = {
|
||||
{
|
||||
"<leader>cf",
|
||||
function()
|
||||
require("conform").format({
|
||||
async = true,
|
||||
timeout_ms = 3000,
|
||||
lsp_format = "fallback",
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
"ibhagwan/fzf-lua",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local fzf_lua = require("fzf-lua")
|
||||
|
||||
-- Setup
|
||||
fzf_lua.setup({})
|
||||
|
||||
-- Register as the UI for vim.ui.select
|
||||
fzf_lua.register_ui_select()
|
||||
|
||||
-- Keymaps
|
||||
vim.keymap.set("n", "<leader>ff", fzf_lua.files)
|
||||
vim.keymap.set("n", "<leader>fb", fzf_lua.buffers)
|
||||
vim.keymap.set("n", "<leader>fh", fzf_lua.oldfiles)
|
||||
vim.keymap.set("n", "<leader>fg", fzf_lua.live_grep)
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
cmd = "Mason",
|
||||
keys = { { "<Leader>cm", "<cmd>Mason<cr>" } },
|
||||
opts = {
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = { "williamboman/mason.nvim" },
|
||||
opts = {
|
||||
ensure_installed = { "lua_ls", "gopls" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
cmd = { "LspInfo", "LspInstall", "LspUninstall" },
|
||||
opts = {
|
||||
servers = {
|
||||
lua_ls = {},
|
||||
ccls = {},
|
||||
gopls = {},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
-- Servers
|
||||
for server, config in pairs(opts.servers) do
|
||||
config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities)
|
||||
lspconfig[server].setup(config)
|
||||
end
|
||||
|
||||
-- Keybinds
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition)
|
||||
vim.keymap.set("n", "<leader>cr", vim.lsp.buf.rename)
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action)
|
||||
|
||||
-- Signs
|
||||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
lazy = false,
|
||||
opts = {
|
||||
options = { section_separators = '', component_separators = '' },
|
||||
extensions = { "fzf", "lazy", "man", "mason", "nvim-tree"},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
return {
|
||||
"bluz71/vim-moonfly-colors",
|
||||
name = "moonfly",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
init = function()
|
||||
vim.g.moonflyTransparent = true
|
||||
end,
|
||||
config = function()
|
||||
vim.cmd("colorscheme moonfly")
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
version = "*",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
event = "VeryLazy",
|
||||
-- lazy = false,
|
||||
config = function()
|
||||
require("nvim-tree").setup({})
|
||||
|
||||
local api = require("nvim-tree.api")
|
||||
|
||||
vim.keymap.set("n", "<leader>e", api.tree.toggle )
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
configs.setup({
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"diff",
|
||||
"html",
|
||||
"javascript",
|
||||
"jsdoc",
|
||||
"json",
|
||||
"jsonc",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"luap",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"printf",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"xml",
|
||||
"yaml",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user