Cleanup before LazyVim initialization
This commit is contained in:
@ -1 +0,0 @@
|
||||
require "nvchad.autocmds"
|
@ -1,19 +0,0 @@
|
||||
-- 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 = "onedark",
|
||||
|
||||
hl_override = {
|
||||
Comment = { italic = true },
|
||||
["@comment"] = { italic = true },
|
||||
},
|
||||
}
|
||||
|
||||
M.nvdash = { load_on_startup = true }
|
||||
|
||||
return M
|
@ -1,13 +0,0 @@
|
||||
local options = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
java = { "java" },
|
||||
},
|
||||
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
}
|
||||
|
||||
return options
|
@ -1,47 +0,0 @@
|
||||
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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
|
||||
local lspconfig = require "lspconfig"
|
||||
local nvlsp = require "nvchad.configs.lspconfig"
|
||||
|
||||
local servers =
|
||||
{ "html", "cssls", "jdtls", "clangd", "gopls", "stylelint_lsp", "jsonls", "svelte", "eslint", "lemminx" }
|
||||
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = nvlsp.on_attach,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = nvlsp.capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
lspconfig["tailwindcss"].setup {
|
||||
on_attach = nvlsp.on_attach,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = nvlsp.capabilities,
|
||||
settings = {
|
||||
validate = true,
|
||||
filetypes = { "svelte" },
|
||||
},
|
||||
}
|
||||
|
||||
local ymlCapabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
ymlCapabilities.textDocument.foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true,
|
||||
}
|
||||
|
||||
lspconfig.yamlls.setup {
|
||||
on_attach = nvlsp.on_attach,
|
||||
on_init = nvlsp.on_init,
|
||||
capabilities = ymlCapabilities,
|
||||
settings = {
|
||||
yaml = {
|
||||
schemas = {},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.vtsls.setup {
|
||||
on_init = nvlsp.on_init,
|
||||
on_attach = nvlsp.on_attach,
|
||||
capabilities = nvlsp.capabilities,
|
||||
filetypes = {
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"javascript.jsx",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"typescript.tsx",
|
||||
"vue",
|
||||
},
|
||||
settings = {
|
||||
vtsls = {
|
||||
autoUseWorkspaceTsdk = true,
|
||||
tsserver = {
|
||||
globalPlugins = {
|
||||
{
|
||||
name = "@vue/typescript-plugin",
|
||||
location = vim.fn.stdpath "data" .. "/mason/packages/vue-language-server/node_modules/@vue/language-server",
|
||||
languages = { "vue" },
|
||||
configNamespace = "typescript",
|
||||
enableForWorkspaceTypeScriptVersions = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
typescript = {
|
||||
preferences = {
|
||||
importModuleSpecifier = "non-relative",
|
||||
updateImportsOnFileMove = {
|
||||
enabled = "always",
|
||||
},
|
||||
suggest = {
|
||||
completeFunctionCalls = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.volar.setup {
|
||||
on_init = nvlsp.on_init,
|
||||
on_attach = nvlsp.on_attach,
|
||||
capabilities = nvlsp.capabilities,
|
||||
settings = {
|
||||
emmet = {
|
||||
showExpandedAbbreviation = "never",
|
||||
},
|
||||
},
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
local options = {
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"luadoc",
|
||||
"printf",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"java",
|
||||
"go",
|
||||
"vue",
|
||||
"typescript",
|
||||
"javascript",
|
||||
"xml",
|
||||
"html",
|
||||
},
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
use_languagetree = true,
|
||||
},
|
||||
|
||||
indent = { enable = true },
|
||||
}
|
||||
|
||||
require("nvim-treesitter.configs").setup(options)
|
@ -1,28 +0,0 @@
|
||||
require "nvchad.mappings"
|
||||
|
||||
local map = vim.keymap.set
|
||||
|
||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
map("i", "jj", "<ESC>")
|
||||
map("n", "<leader>cd", ":cd ..<CR>", { desc = "Go to parent directory" })
|
||||
map("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "LSP code action" })
|
||||
map("v", "<leader>ca", vim.lsp.buf.code_action, { desc = "LSP code action" })
|
||||
map("n", "<leader>fl", function()
|
||||
require("telescope.builtin").lsp_references {}
|
||||
end, { desc = "Find references (LSP)" })
|
||||
map("n", "<leader>j", function()
|
||||
vim.diagnostic.jump { count = 1 }
|
||||
end, { desc = "Go to next diagnostic" })
|
||||
|
||||
map("n", "<leader>k", function()
|
||||
vim.diagnostic.jump { count = -1 }
|
||||
end, { desc = "Go to previous diagnostic" })
|
||||
|
||||
local modes = { "n", "i", "v", "x" }
|
||||
local keys = { "<Up>", "<Down>", "<Left>", "<Right>" }
|
||||
|
||||
for _, mode in ipairs(modes) do
|
||||
for _, key in ipairs(keys) do
|
||||
map(mode, key, "<Nop>", { desc = "Disabled arrow key" })
|
||||
end
|
||||
end
|
@ -1,9 +0,0 @@
|
||||
require "nvchad.options"
|
||||
|
||||
local g = vim.g
|
||||
local o = vim.o
|
||||
o.shiftwidth = 4
|
||||
o.tabstop = 4
|
||||
o.softtabstop = 4
|
||||
|
||||
g.lua_snippets_path = vim.fn.stdpath "config" .. "/lua/snippets"
|
@ -1,63 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = "BufWritePre",
|
||||
opts = require "configs.conform",
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "configs.lspconfig"
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
event = "VeryLazy",
|
||||
"natecraddock/workspaces.nvim",
|
||||
config = function()
|
||||
require("workspaces").setup()
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
opts = function()
|
||||
local conf = require "nvchad.configs.nvimtree"
|
||||
conf.renderer.group_empty = true
|
||||
return conf
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
require "configs.treesitter",
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
require "plugins.java.init",
|
||||
},
|
||||
|
||||
{
|
||||
"mg979/vim-visual-multi",
|
||||
branch = "master",
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = function()
|
||||
return { mode = "cursor", max_lines = 3 }
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {},
|
||||
},
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
return {
|
||||
"nvim-java/nvim-java",
|
||||
dependencies = {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
jdtls = {
|
||||
settings = {
|
||||
java = {
|
||||
configuration = {
|
||||
runtimes = {
|
||||
{
|
||||
name = "JavaSE-21",
|
||||
path = "/usr/bin/java",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
setup = {
|
||||
jdtls = function()
|
||||
require("java").setup {
|
||||
jdk = {
|
||||
auto_install = false,
|
||||
},
|
||||
root_markers = {
|
||||
"settings.gradle",
|
||||
"settings.gradle.kts",
|
||||
"pom.xml",
|
||||
"build.gradle",
|
||||
"mvnw",
|
||||
"gradlew",
|
||||
"build.gradle",
|
||||
"build.gradle.kts",
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
local ls = require "luasnip"
|
||||
local s = ls.snippet
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
|
||||
-- Function to get the current class name from filename
|
||||
local function get_class_name()
|
||||
local filename = vim.fn.expand "%:t:r" -- Get filename without extension
|
||||
return filename
|
||||
end
|
||||
|
||||
return {
|
||||
-- Logger with automatic class name detection
|
||||
s("logger", {
|
||||
t "private static final Logger log = LoggerFactory.getLogger(",
|
||||
f(get_class_name, {}),
|
||||
t ".class);",
|
||||
}),
|
||||
}
|
Reference in New Issue
Block a user