initial 0.11 rebuild
Some checks failed
Close stale issues and PRs / stale (push) Has been cancelled
Some checks failed
Close stale issues and PRs / stale (push) Has been cancelled
This commit is contained in:
1
lua/autocmds.lua
Normal file
1
lua/autocmds.lua
Normal file
@@ -0,0 +1 @@
|
||||
require "nvchad.autocmds"
|
||||
34
lua/chadrc.lua
Normal file
34
lua/chadrc.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
-- This file needs to have same structure as nvconfig.lua
|
||||
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
|
||||
-- Please read that file to know all available options :(
|
||||
|
||||
---@type ChadrcConfig
|
||||
local M = {}
|
||||
-- ui = {
|
||||
-- statusline = {
|
||||
-- separator_style = "arrow",
|
||||
-- theme = "vscode"
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
|
||||
|
||||
M.base46 = {
|
||||
theme = "wombat",
|
||||
|
||||
-- hl_override = {
|
||||
-- Comment = { italic = true },
|
||||
-- ["@comment"] = { italic = true },
|
||||
-- },
|
||||
}
|
||||
|
||||
-- M.nvdash = { load_on_startup = true }
|
||||
|
||||
M.ui = {
|
||||
statusline = {
|
||||
separator_style = "block",
|
||||
-- theme = "vscode_colored"
|
||||
}
|
||||
}
|
||||
|
||||
return M
|
||||
15
lua/configs/conform.lua
Normal file
15
lua/configs/conform.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
local options = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
-- css = { "prettier" },
|
||||
-- html = { "prettier" },
|
||||
},
|
||||
|
||||
-- format_on_save = {
|
||||
-- -- These options will be passed to conform.format()
|
||||
-- timeout_ms = 500,
|
||||
-- lsp_fallback = true,
|
||||
-- },
|
||||
}
|
||||
|
||||
return options
|
||||
47
lua/configs/lazy.lua
Normal file
47
lua/configs/lazy.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
return {
|
||||
defaults = { lazy = true },
|
||||
install = { colorscheme = { "nvchad" } },
|
||||
|
||||
ui = {
|
||||
icons = {
|
||||
ft = "",
|
||||
lazy = " ",
|
||||
loaded = "",
|
||||
not_loaded = "",
|
||||
},
|
||||
},
|
||||
|
||||
performance = {
|
||||
rtp = {
|
||||
disabled_plugins = {
|
||||
"2html_plugin",
|
||||
"tohtml",
|
||||
"getscript",
|
||||
"getscriptPlugin",
|
||||
"gzip",
|
||||
"logipat",
|
||||
"netrw",
|
||||
"netrwPlugin",
|
||||
"netrwSettings",
|
||||
"netrwFileHandlers",
|
||||
"matchit",
|
||||
"tar",
|
||||
"tarPlugin",
|
||||
"rrhelper",
|
||||
"spellfile_plugin",
|
||||
"vimball",
|
||||
"vimballPlugin",
|
||||
"zip",
|
||||
"zipPlugin",
|
||||
"tutor",
|
||||
"rplugin",
|
||||
"syntax",
|
||||
"synmenu",
|
||||
"optwin",
|
||||
"compiler",
|
||||
"bugreport",
|
||||
"ftplugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
18
lua/configs/lspconfig.lua
Normal file
18
lua/configs/lspconfig.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
|
||||
local servers = { "html", "cssls" }
|
||||
vim.lsp.enable(servers)
|
||||
|
||||
-- vim.lsp.elixirls.setup({
|
||||
-- cmd = { "elixir-ls" }, -- Path to the elixir-ls executable
|
||||
-- filetypes = { "elixir", "eelixir" }, -- Filetypes associated with Elixir
|
||||
-- settings = {
|
||||
-- elixirLS = {
|
||||
-- dialyzerEnabled = true,
|
||||
-- fetchDeps = true,
|
||||
-- enableTestLenses = true,
|
||||
-- },
|
||||
-- }
|
||||
-- })
|
||||
|
||||
-- read :h vim.lsp.config for changing options of lsp servers
|
||||
89
lua/mappings.lua
Normal file
89
lua/mappings.lua
Normal file
@@ -0,0 +1,89 @@
|
||||
require "nvchad.mappings"
|
||||
|
||||
-- add yours here
|
||||
|
||||
local map = vim.keymap.set
|
||||
|
||||
-- map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
map("i", "jk", "<ESC>")
|
||||
|
||||
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
||||
|
||||
-- Insert mode: paste from OS without autopairing
|
||||
map("i", "<c-r>", "<c-v>", { desc = "paste from OS without autopairing" })
|
||||
|
||||
-- Window management
|
||||
map("n", "<leader>wv", "<C-w>v", { desc = "Split vertical" })
|
||||
map("n", "<leader>ws", "<C-w>s", { desc = "Split horizontal" })
|
||||
map("n", "<leader>wo", "<C-w>o", { desc = "Maximize split" })
|
||||
map("n", "<leader>wc", "<C-w>c", { desc = "Close split" })
|
||||
map("n", "<leader>wx", "<C-w>c", { desc = "Close split" })
|
||||
map("n", "<leader>w=", "<C-w>=", { desc = "Even splits" })
|
||||
map("n", "<leader>h", "<C-w>h", { desc = "Focus left split" })
|
||||
map("n", "<leader>j", "<C-w>j", { desc = "Focus lower split" })
|
||||
map("n", "<leader>k", "<C-w>k", { desc = "Focus upper split" })
|
||||
map("n", "<leader>l", "<C-w>l", { desc = "Focus right split" })
|
||||
|
||||
-- File operations
|
||||
map("n", "<leader>ee", ':e <C-R>=expand("%:p:h" . "/" <CR><CR>)', { desc = "Copy relative path to file" })
|
||||
map("n", "<leader>er", ":!echo -n % | pbcopy<CR>", { desc = "Copy absolute path to file" })
|
||||
map("n", "<leader>gn", ":Telescope resume<CR>", { desc = "Resume telescope" })
|
||||
map("n", "<leader>eu", '!!python -c "import uuid; print(uuid.uuid4())"<CR>', { desc = "Drop fresh uuid4" })
|
||||
|
||||
-- Clipboard operations
|
||||
map("n", "<c-c>", '"+y', { desc = "Copy to OS clipboard" })
|
||||
|
||||
-- Save
|
||||
map("n", ",,", ":w<CR>", { desc = "Save" })
|
||||
map("n", "<leader> ", ":w<CR>", { desc = "Save" })
|
||||
|
||||
-- NvimTree Toggle
|
||||
map("n", "<leader>n", "<cmd> NvimTreeToggle <CR>", { desc = "Toggle NvimTree" })
|
||||
|
||||
-- Toggle line numbers
|
||||
map("n", "<leader>N", "<cmd> set nu! <CR>", { desc = "Toggle line number" })
|
||||
|
||||
-- Buffer operations
|
||||
map("n", "<leader>x", "<cmd>bdelete<CR>", { desc = "Close Buffer and window" })
|
||||
map("n", "<leader>X", "<cmd>bdelete!<CR>", { desc = "Close Buffer and window!" })
|
||||
map("n", "<leader>c", "<cmd>Bdelete<CR>", { desc = "Close Buffer" })
|
||||
map("n", "<leader>b", "<cmd> Telescope buffers <CR>", { desc = "Find buffers" })
|
||||
|
||||
-- Git operations
|
||||
map("n", "gb", "<cmd>Gitsigns blame<CR>", { desc = "Git blame" })
|
||||
map("n", "gB", "<cmd>Gitsigns blame_line<CR>", { desc = "Git blame line" })
|
||||
map("n", "gu", "<cmd>diffget //2<CR>", { desc = "Select left in conflict" })
|
||||
map("n", "gh", "<cmd>diffget //3<CR>", { desc = "Select right in conflict" })
|
||||
|
||||
-- Floating diagnostics
|
||||
map("n", "ge", function()
|
||||
vim.diagnostic.open_float({ border = "rounded" })
|
||||
end, { desc = "Floating diagnostic" })
|
||||
|
||||
-- Buffer navigation
|
||||
map("n", ",z", ":bnext<CR>", { desc = "Next buffer" })
|
||||
map("n", ",v", ":bprevious<CR>", { desc = "Previous buffer" })
|
||||
map("n", "<leader>z", function()
|
||||
require("nvchad.tabufline").tabuflineNext()
|
||||
end, { desc = "Goto next buffer" })
|
||||
map("n", "<leader>v", function()
|
||||
require("nvchad.tabufline").tabuflinePrev()
|
||||
end, { desc = "Goto prev buffer" })
|
||||
|
||||
-- Neotest commands
|
||||
map("n", "<leader>tl", ":Neotest run last<CR>", { desc = "Neotest Run Last" })
|
||||
map("n", "<leader>ts", ":Neotest summary<CR>", { desc = "Neotest Summary" })
|
||||
map("n", "<leader>to", ":Neotest output<CR>", { desc = "Neotest Output" })
|
||||
map("n", "<leader>ta", ":Neotest output-panel<CR>", { desc = "Neotest Output Panel" })
|
||||
|
||||
-- Visual Mode
|
||||
map("v", ">", ">gv", { desc = "Indent" })
|
||||
map("v", "<c-c>", '"+y', { desc = "Copy to OS clipboard" })
|
||||
|
||||
-- LSP
|
||||
map("n", "<leader>ls", ":LspInfo<CR>", { desc = "Show LSP info" })
|
||||
map("n", "go", vim.lsp.buf.format, { desc = "LSP formatting" })
|
||||
map("n", "gd", vim.lsp.buf.definition, { desc = "Go to definition" })
|
||||
map("n", "<leader>gr", vim.lsp.buf.references, { desc = "Find references" })
|
||||
map("n", "<leader>rn", vim.lsp.buf.rename, { desc = "Rename symbol" })
|
||||
|
||||
9
lua/options.lua
Normal file
9
lua/options.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
require "nvchad.options"
|
||||
|
||||
-- add yours here!
|
||||
|
||||
-- local o = vim.o
|
||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
||||
|
||||
vim.g.lua_snippets_path = { vim.fn.stdpath "config" .. "/snippets" }
|
||||
|
||||
74
lua/plugins/init.lua
Normal file
74
lua/plugins/init.lua
Normal file
@@ -0,0 +1,74 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
-- event = 'BufWritePre', -- uncomment for format on save
|
||||
opts = require "configs.conform",
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "configs.lspconfig"
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"elixir-tools/elixir-tools.nvim",
|
||||
version = "*",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
local elixir = require "elixir"
|
||||
local elixirls = require "elixir.elixirls"
|
||||
|
||||
elixir.setup {
|
||||
nextls = { enable = true },
|
||||
credo = {},
|
||||
elixirls = {
|
||||
enable = true,
|
||||
settings = elixirls.settings {
|
||||
dialyzerEnabled = false,
|
||||
enableTestLenses = false,
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
vim.keymap.set("n", "<space>fp", ":ElixirFromPipe<cr>", { buffer = true, noremap = true })
|
||||
vim.keymap.set("n", "<space>tp", ":ElixirToPipe<cr>", { buffer = true, noremap = true })
|
||||
vim.keymap.set("v", "<space>em", ":ElixirExpandMacro<cr>", { buffer = true, noremap = true })
|
||||
end,
|
||||
},
|
||||
}
|
||||
end,
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
},
|
||||
|
||||
{ "tpope/vim-surround", lazy = false },
|
||||
{ "famiu/bufdelete.nvim", lazy = false },
|
||||
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function(_, opts)
|
||||
require("gitsigns").setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
enabled = false,
|
||||
},
|
||||
|
||||
|
||||
|
||||
-- test new blink
|
||||
-- { import = "nvchad.blink.lazyspec" },
|
||||
|
||||
-- {
|
||||
-- "nvim-treesitter/nvim-treesitter",
|
||||
-- opts = {
|
||||
-- ensure_installed = {
|
||||
-- "vim", "lua", "vimdoc",
|
||||
-- "html", "css"
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
Reference in New Issue
Block a user