Initial commit
This commit is contained in:
1
lua/autocmds.lua
Normal file
1
lua/autocmds.lua
Normal file
@@ -0,0 +1 @@
|
||||
require "nvchad.autocmds"
|
||||
24
lua/chadrc.lua
Normal file
24
lua/chadrc.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
-- 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 = {}
|
||||
|
||||
M.base46 = {
|
||||
theme = "radium",
|
||||
|
||||
-- hl_override = {
|
||||
-- Comment = { italic = true },
|
||||
-- ["@comment"] = { italic = true },
|
||||
-- },
|
||||
}
|
||||
|
||||
-- M.nvdash = { load_on_startup = true }
|
||||
-- M.ui = {
|
||||
-- tabufline = {
|
||||
-- lazyload = false
|
||||
-- }
|
||||
-- }
|
||||
|
||||
return M
|
||||
14
lua/configs/conform.lua
Normal file
14
lua/configs/conform.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
local options = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
css = { "prettier" },
|
||||
html = { "prettier" },
|
||||
},
|
||||
|
||||
format_on_save = {
|
||||
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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
15
lua/configs/lspconfig.lua
Normal file
15
lua/configs/lspconfig.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
|
||||
local servers = {
|
||||
"html",
|
||||
"cssls",
|
||||
"clangd",
|
||||
"ts_ls",
|
||||
"jsonls",
|
||||
"rust_analyzer",
|
||||
"eslint",
|
||||
"svelte",
|
||||
"tailwindcss",
|
||||
"texlab",
|
||||
}
|
||||
vim.lsp.enable(servers)
|
||||
10
lua/mappings.lua
Normal file
10
lua/mappings.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
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>")
|
||||
12
lua/options.lua
Normal file
12
lua/options.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
require "nvchad.options"
|
||||
|
||||
vim.opt.colorcolumn = "80"
|
||||
vim.wo.relativenumber = true
|
||||
|
||||
vim.opt.spell = true
|
||||
vim.opt.spelllang = { "en_us", "cs" }
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "java",
|
||||
command = "setlocal tabstop=4 shiftwidth=4 expandtab"
|
||||
})
|
||||
148
lua/plugins/init.lua
Normal file
148
lua/plugins/init.lua
Normal file
@@ -0,0 +1,148 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = "BufWritePre",
|
||||
opts = require "configs.conform",
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "configs.lspconfig"
|
||||
end,
|
||||
},
|
||||
|
||||
{ import = "nvchad.blink.lazyspec" },
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"vim",
|
||||
"lua",
|
||||
"vimdoc",
|
||||
"html",
|
||||
"css",
|
||||
"tsx",
|
||||
"jsx",
|
||||
"rust",
|
||||
"vue",
|
||||
"svelte",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("nvim-ts-autotag").setup {
|
||||
opts = {
|
||||
enable_close = true,
|
||||
enable_rename = true,
|
||||
enable_close_on_slash = false,
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- required
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
"sindrets/diffview.nvim", -- optional
|
||||
"ibhagwan/fzf-lua", -- optional
|
||||
},
|
||||
config = true,
|
||||
lazy = false,
|
||||
},
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = "cd app && yarn install",
|
||||
init = function()
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<leader>mp", ":MarkdownPreview<CR>", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>ms", ":MarkdownPreviewStop<CR>", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>gl", ":Neogit<CR>", { noremap = true, silent = true })
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
},
|
||||
{
|
||||
"mg979/vim-visual-multi",
|
||||
lazy = false,
|
||||
},
|
||||
{
|
||||
"sourcegraph/sg.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
build = "nvim -l build/init.lua",
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
{
|
||||
"ThePrimeagen/vim-be-good",
|
||||
lazy = false,
|
||||
},
|
||||
{
|
||||
"andweeb/presence.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("presence").setup {
|
||||
-- General options
|
||||
auto_update = true,
|
||||
neovim_image_text = "The One True Text Editor",
|
||||
main_image = "neovim",
|
||||
log_level = nil,
|
||||
debounce_timeout = 10,
|
||||
enable_line_number = false,
|
||||
blacklist = {},
|
||||
buttons = true,
|
||||
file_assets = {},
|
||||
show_time = true,
|
||||
|
||||
-- Rich Presence text options
|
||||
editing_text = "Editing %s",
|
||||
file_explorer_text = "Browsing %s",
|
||||
git_commit_text = "Committing changes",
|
||||
plugin_manager_text = "Managing plugins",
|
||||
reading_text = "Reading %s",
|
||||
workspace_text = "Working on %s",
|
||||
line_number_text = "Line %s out of %s",
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"lervag/vimtex",
|
||||
lazy = false,
|
||||
init = function()
|
||||
vim.g.vimtex_view_method = "zathura_simple"
|
||||
|
||||
vim.g.vimtex_compiler_latexmk = {
|
||||
out_dir = "build",
|
||||
options = {
|
||||
"-pdf",
|
||||
"-shell-escape",
|
||||
"-verbose",
|
||||
"-file-line-error",
|
||||
"-synctex=1",
|
||||
},
|
||||
}
|
||||
|
||||
-- Mappings
|
||||
local km = vim.keymap.set
|
||||
km("n", "<localleader>ll", vim.cmd.VimtexCompile, { desc = "VimtexCompile" })
|
||||
km("n", "<localleader>lv", vim.cmd.VimtexView, { desc = "VimtexView" })
|
||||
km("n", "<localleader>lc", vim.cmd.VimtexCompileSS, { desc = "VimtexCompileSS" })
|
||||
km("n", "<localleader>le", vim.cmd.VimtexErrors, { desc = "VimtexErrors" })
|
||||
km("n", "<localleader>lo", vim.cmd.VimtexOutput, { desc = "VimtexOutput" })
|
||||
km("n", "<localleader>ls", vim.cmd.VimtexStop, { desc = "VimtexStop" })
|
||||
km("n", "<localleader>lS", vim.cmd.VimtexStopAll, { desc = "VimtexStopAll" })
|
||||
km("n", "<localleader>li", vim.cmd.VimtexInfo, { desc = "VimtexInfo" })
|
||||
km("n", "<localleader>lT", vim.cmd.VimtexTocOpen, { desc = "VimtexTocOpen" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user