initial commit
This commit is contained in:
commit
413750ce81
10 changed files with 154 additions and 0 deletions
4
README.md
Normal file
4
README.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# nvim.arc
|
||||||
|
|
||||||
|
relatively lightweight neovim plugins and configuration.
|
||||||
|
|
3
init.lua
Normal file
3
init.lua
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
require("config.nvim")
|
||||||
|
require("config.lazy")
|
||||||
|
|
11
lazy-lock.json
Normal file
11
lazy-lock.json
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"adwaita.nvim": { "branch": "main", "commit": "29005f0b66151be26c13eca5755933ade0989572" },
|
||||||
|
"blink.cmp": { "branch": "main", "commit": "3513b27d1565d09927ccb8c81731ee06dab6c1c7" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "c4c84f4521d62de595c0d0f718a9a40c1890c8ce" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "2d0ca00368742c0c7af802b9b2a920c4cd02303a" },
|
||||||
|
"nvim-treesitter": { "branch": "main", "commit": "98459ffcf7dfbeea83081166a2d732a8083a91c2" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }
|
||||||
|
}
|
22
lua/config/lazy.lua
Normal file
22
lua/config/lazy.lua
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
-- Bootstrap lazy.nvim
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
{ out, "WarningMsg" },
|
||||||
|
{ "\nPress any key to exit..." },
|
||||||
|
}, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- Setup lazy.nvim
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {{ import = "plugins" }},
|
||||||
|
checker = { enabled = false },
|
||||||
|
})
|
40
lua/config/nvim.lua
Normal file
40
lua/config/nvim.lua
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
-- tabstops -> 4 spaces
|
||||||
|
vim.o.tabstop = 4
|
||||||
|
vim.o.expandtab = true
|
||||||
|
vim.o.softtabstop = 4
|
||||||
|
vim.o.shiftwidth = 4
|
||||||
|
|
||||||
|
-- disable netrw in favour of telescope
|
||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
|
-- colours
|
||||||
|
vim.o.background = "light"
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
vim.opt.signcolumn = "number"
|
||||||
|
|
||||||
|
-- line numbers
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
vim.opt.signcolumn = "number"
|
||||||
|
|
||||||
|
-- allow virtual lines for lsp inline warnings/errors
|
||||||
|
vim.diagnostic.config({ virtual_lines = true })
|
||||||
|
vim.diagnostic.config({ virtual_text = true })
|
||||||
|
|
||||||
|
-- custom keymaps
|
||||||
|
-- keymaps for plugins are defined in the plugin config.
|
||||||
|
|
||||||
|
-- keep neovide-specifics neovide-specific
|
||||||
|
if not vim.g.neovide then
|
||||||
|
-- disable cursor animations
|
||||||
|
vim.g.neovide_position_animation_length = 0
|
||||||
|
vim.g.neovide_cursor_animation_length = 0.00
|
||||||
|
vim.g.neovide_cursor_trail_size = 0
|
||||||
|
vim.g.neovide_cursor_animate_in_insert_mode = false
|
||||||
|
|
||||||
|
vim.g.neovide_cursor_animate_command_line = false
|
||||||
|
vim.g.neovide_scroll_animation_far_lines = 0
|
||||||
|
vim.g.neovide_scroll_animation_length = 0.00
|
||||||
|
end
|
10
lua/plugins/adwaita.lua
Normal file
10
lua/plugins/adwaita.lua
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"Mofiqul/adwaita.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
vim.cmd("colorscheme adwaita")
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
11
lua/plugins/blink.lua
Normal file
11
lua/plugins/blink.lua
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
return {
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
fuzzy = { implementation = "lua" },
|
||||||
|
completion = { documentation = { auto_show = true } },
|
||||||
|
signature = { enabled = true }
|
||||||
|
},
|
||||||
|
opts_extend = { "sources.default" }
|
||||||
|
}
|
||||||
|
|
27
lua/plugins/mason.lua
Normal file
27
lua/plugins/mason.lua
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"mason-org/mason.nvim",
|
||||||
|
config = function()
|
||||||
|
require("mason").setup()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mason-org/mason-lspconfig.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
"mason-org/mason.nvim",
|
||||||
|
},
|
||||||
|
event = "BufReadPost",
|
||||||
|
opts = function()
|
||||||
|
return {
|
||||||
|
ensure_installed = { "rust_analyzer", "lua_ls", "gopls" },
|
||||||
|
automatic_installation = true,
|
||||||
|
handlers = {
|
||||||
|
function(sn)
|
||||||
|
require("lspconfig")[sn].setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
9
lua/plugins/nvim-treesitter.lua
Normal file
9
lua/plugins/nvim-treesitter.lua
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
branch = "main",
|
||||||
|
lazy = false,
|
||||||
|
build = ":TSUpdate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
17
lua/plugins/telescope.lua
Normal file
17
lua/plugins/telescope.lua
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim"
|
||||||
|
},
|
||||||
|
keys = function()
|
||||||
|
local builtin = require("telescope.builtin")
|
||||||
|
return {
|
||||||
|
{ "<leader>ff", builtin.find_files, { desc = "Telescope find files" } },
|
||||||
|
{ "<leader>fg", builtin.live_grep, { desc = "Telescope live grep" } },
|
||||||
|
{ "<leader>fb", builtin.buffers, { desc = "Telescope buffers" } },
|
||||||
|
{ "<leader>fh", builtin.help_tags, { desc = "Telescope help tags" } }
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue