Dots Updated
* Adds Neovim config
This commit is contained in:
5
nvim/.luarc.json
Normal file
5
nvim/.luarc.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"diagnostics.globals": [
|
||||
"vim"
|
||||
]
|
||||
}
|
||||
33
nvim/init.lua
Normal file
33
nvim/init.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
vim.cmd("set expandtab")
|
||||
vim.cmd("set tabstop=2")
|
||||
vim.cmd("set softtabstop=2")
|
||||
vim.cmd("set shiftwidth=2")
|
||||
vim.cmd("set number")
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- 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)
|
||||
local opts = {}
|
||||
|
||||
require("lazy").setup("plugins")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
15
nvim/lazy-lock.json
Normal file
15
nvim/lazy-lock.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"catppuccin": { "branch": "main", "commit": "31fcfb02c47952d5c75aec893b93b2878abe5fbb" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "407e65c7924989c1efed6bbc89e6287e2d140f02" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
|
||||
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" },
|
||||
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "cf97d2485fc3f6d4df1b79a3ea183e24c272215e" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "f2f828c5e995af156106a4aa5647463e49fff66a" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }
|
||||
}
|
||||
2
nvim/lua/plugins.lua
Normal file
2
nvim/lua/plugins.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
return {}
|
||||
10
nvim/lua/plugins/catppuccin.lua
Normal file
10
nvim/lua/plugins/catppuccin.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
{
|
||||
"catpnuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 997,
|
||||
config = function()
|
||||
vim.cmd.colorscheme "catppuccin"
|
||||
end
|
||||
}
|
||||
}
|
||||
32
nvim/lua/plugins/lsp-configs.lua
Normal file
32
nvim/lua/plugins/lsp-configs.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls", "clangd", "crystalline", "html", "htmx", "jsonls", "ols"},
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.lua_ls.setup({})
|
||||
lspconfig.clangd.setup({})
|
||||
lspconfig.crystalline.setup({})
|
||||
lspconfig.html.setup({})
|
||||
lspconfig.htmx.setup({})
|
||||
lspconfig.jsonls.setup({})
|
||||
lspconfig.ols.setup({})
|
||||
vim.keymap.set('n','gd', vim.lsp.buf.definition, {})
|
||||
vim.keymap.set('n','K', vim.lsp.buf.hover, {})
|
||||
vim.keymap.set({'n'},'<leader>ca', vim.lsp.buf.code_action, {})
|
||||
end
|
||||
}
|
||||
}
|
||||
13
nvim/lua/plugins/lualine.lua
Normal file
13
nvim/lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
config = function()
|
||||
require('lualine').setup({
|
||||
option = {
|
||||
theme = "dracula"
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
}
|
||||
14
nvim/lua/plugins/neotree.lua
Normal file
14
nvim/lua/plugins/neotree.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v1.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim"
|
||||
},
|
||||
config = function()
|
||||
vim.keymap.set('n','<C-n>', ':Neotree toggle<CR>', {})
|
||||
end
|
||||
}
|
||||
}
|
||||
29
nvim/lua/plugins/telescope.lua
Normal file
29
nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
return {
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
tag = '-2.1.8',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local builtin = require("telescope.builtin")
|
||||
|
||||
vim.keymap.set('n','<C-p>', builtin.find_files, {})
|
||||
vim.keymap.set('n','<leader>fg', builtin.live_grep, {})
|
||||
end
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
config = function()
|
||||
require("telescope").setup {
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
require("telescope").load_extension("ui-select")
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
16
nvim/lua/plugins/treesitter.lua
Normal file
16
nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return{
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
|
||||
local config = require("nvim-treesitter.configs")
|
||||
config.setup({
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "elixir", "heex", "javascript", "html", "css","fish","json","make","odin","rasi","xml" },
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user