feat(neovide): add initial config files
This commit is contained in:
22
nvim-neovide/lua/plugins/blink.lua
Normal file
22
nvim-neovide/lua/plugins/blink.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
"saghen/blink.cmp",
|
||||
dependencies = "rafamadriz/friendly-snippets",
|
||||
version = "*",
|
||||
opts = {
|
||||
keymap = {
|
||||
preset = "default",
|
||||
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
|
||||
["<C-e>"] = { "hide" },
|
||||
["<CR>"] = { "accept", "fallback" },
|
||||
["<Tab>"] = { "select_next", "fallback" },
|
||||
["<S-Tab>"] = { "select_prev", "fallback" },
|
||||
},
|
||||
appearance = {
|
||||
use_nvim_cmp_as_default = true,
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
sources = {
|
||||
default = { "lsp", "path", "snippets", "buffer" },
|
||||
},
|
||||
},
|
||||
}
|
||||
8
nvim-neovide/lua/plugins/catppuccin.lua
Normal file
8
nvim-neovide/lua/plugins/catppuccin.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
vim.cmd("colorscheme catppuccin-mocha")
|
||||
end,
|
||||
}
|
||||
26
nvim-neovide/lua/plugins/lsp.lua
Normal file
26
nvim-neovide/lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = { "saghen/blink.cmp" },
|
||||
config = function()
|
||||
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
||||
|
||||
vim.lsp.config["clangd"] = {
|
||||
cmd = { "clangd" },
|
||||
filetypes = { "c", "cpp" },
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
vim.lsp.enable("clangd")
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(args)
|
||||
local opts = { buffer = args.buf }
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set("n", "<leader>F", vim.lsp.buf.format, opts)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
14
nvim-neovide/lua/plugins/nvim-treesitter.lua
Normal file
14
nvim-neovide/lua/plugins/nvim-treesitter.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "markdown" },
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end,
|
||||
}
|
||||
12
nvim-neovide/lua/plugins/telescope.lua
Normal file
12
nvim-neovide/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.8",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Find files" })
|
||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, { desc = "Live grep files" })
|
||||
vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "Find buffers" })
|
||||
vim.keymap.set("n", "<leader>fh", builtin.help_tags, { desc = "Help tags" })
|
||||
end,
|
||||
}
|
||||
6
nvim-neovide/lua/plugins/which-key.lua
Normal file
6
nvim-neovide/lua/plugins/which-key.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
keys = {},
|
||||
}
|
||||
Reference in New Issue
Block a user