Changed form catpuccin theme, not a vscode soy dev
This commit is contained in:
@@ -14,7 +14,7 @@ map("n", "<leader>h", "<cmd>nohlsearch<cr>", { desc = "No highlight" })
|
||||
-- Diagnostics
|
||||
map("n", "[d", vim.diagnostic.goto_prev, { desc = "Prev diagnostic" })
|
||||
map("n", "]d", vim.diagnostic.goto_next, { desc = "Next diagnostic" })
|
||||
map("n", "<leader>e", vim.diagnostic.open_float, { desc = "Diagnostic float" })
|
||||
map("n", "<leader>y", vim.diagnostic.open_float, { desc = "Diagnostic float" })
|
||||
|
||||
-- Window navigation
|
||||
map("n", "<C-h>", "<C-w>h", { desc = "Left window" })
|
||||
@@ -24,6 +24,11 @@ map("n", "<C-l>", "<C-w>l", { desc = "Right window" })
|
||||
|
||||
local diagnostics_visible = true
|
||||
|
||||
-- Enable inline diagnostics on startup
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
})
|
||||
|
||||
map("n", "<leader>td", function()
|
||||
diagnostics_visible = not diagnostics_visible
|
||||
vim.diagnostic.config({
|
||||
|
||||
@@ -28,3 +28,4 @@ opt.mouse = "a"
|
||||
|
||||
opt.updatetime = 250
|
||||
opt.timeoutlen = 400
|
||||
vim.wo.fillchars = 'eob:·'
|
||||
|
||||
@@ -5,9 +5,9 @@ return {
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter.config").setup({
|
||||
highlight = { enabled = true },
|
||||
highlight = { enable = true },
|
||||
additional_vim_regex_highlighting = false,
|
||||
indent = { enabled = true },
|
||||
indent = { enable = true },
|
||||
ensure_installed = {
|
||||
"go",
|
||||
"gomod",
|
||||
@@ -22,6 +22,12 @@ return {
|
||||
"yaml",
|
||||
"bash",
|
||||
"c_sharp",
|
||||
"java",
|
||||
"c",
|
||||
"cpp",
|
||||
"julia",
|
||||
"python",
|
||||
"zig",
|
||||
},
|
||||
})
|
||||
end,
|
||||
|
||||
+83
-8
@@ -10,7 +10,7 @@ return {
|
||||
dependencies = { "williamboman/mason.nvim" },
|
||||
opts = {
|
||||
-- installs these via Mason (so you don't have to)
|
||||
ensure_installed = { "gopls", "ts_ls", "lua_ls", "clangd", "rust_analyzer", "omnisharp" },
|
||||
ensure_installed = { "gopls", "ts_ls", "lua_ls", "clangd", "rust_analyzer", "omnisharp", "jdtls", "julials", "pyright", "zls" },
|
||||
|
||||
-- optional: automatically call vim.lsp.enable() for installed servers
|
||||
automatic_enable = true,
|
||||
@@ -73,10 +73,13 @@ return {
|
||||
|
||||
vim.lsp.config("clangd", {
|
||||
capabilities = capabilities,
|
||||
cmd = { "clangd", "--background-index" },
|
||||
-- nice-to-haves:
|
||||
-- "--clang-tidy", -- enable clang-tidy diagnostics (can be noisy)
|
||||
-- "--completion-style=detailed",
|
||||
cmd = {
|
||||
"clangd",
|
||||
"--background-index",
|
||||
"--query-driver=/usr/bin/g++,/usr/bin/gcc",
|
||||
"--completion-style=detailed",
|
||||
"--header-insertion=iwyu",
|
||||
},
|
||||
})
|
||||
vim.lsp.config("rust_analyzer", {
|
||||
capabilities = capabilities,
|
||||
@@ -89,9 +92,25 @@ return {
|
||||
},
|
||||
},
|
||||
})
|
||||
-- If you did NOT set mason-lspconfig automatic_enable=true,
|
||||
-- enable explicitly:
|
||||
-- vim.lsp.enable({ "gopls", "ts_ls", "lua_ls" })
|
||||
|
||||
vim.lsp.config("julials", {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
vim.lsp.config("pyright", {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
vim.lsp.config("zls", {
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
zls = {
|
||||
enable_snippets = true,
|
||||
enable_semantic_tokens = true,
|
||||
enable_inlay_hints = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -143,6 +162,59 @@ return {
|
||||
end,
|
||||
},
|
||||
|
||||
-- Java LSP (requires special handling)
|
||||
{
|
||||
"mfussenegger/nvim-jdtls",
|
||||
ft = "java",
|
||||
config = function()
|
||||
local jdtls_path = vim.fn.stdpath("data") .. "/mason/packages/jdtls"
|
||||
local launcher = vim.fn.glob(jdtls_path .. "/plugins/org.eclipse.equinox.launcher_*.jar")
|
||||
local config_dir = jdtls_path .. "/config_linux"
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "java",
|
||||
callback = function()
|
||||
local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":p:h:t")
|
||||
local workspace_dir = vim.fn.stdpath("data") .. "/jdtls-workspace/" .. project_name
|
||||
|
||||
local config = {
|
||||
cmd = {
|
||||
"java",
|
||||
"-Declipse.application=org.eclipse.jdt.ls.core.id1",
|
||||
"-Dosgi.bundles.defaultStartLevel=4",
|
||||
"-Declipse.product=org.eclipse.jdt.ls.core.product",
|
||||
"-Xmx1g",
|
||||
"--add-modules=ALL-SYSTEM",
|
||||
"--add-opens", "java.base/java.util=ALL-UNNAMED",
|
||||
"--add-opens", "java.base/java.lang=ALL-UNNAMED",
|
||||
"-jar", launcher,
|
||||
"-configuration", config_dir,
|
||||
"-data", workspace_dir,
|
||||
},
|
||||
root_dir = require("jdtls.setup").find_root({ ".git", "mvnw", "gradlew", "pom.xml", "build.gradle" }),
|
||||
settings = {
|
||||
java = {
|
||||
signatureHelp = { enabled = true },
|
||||
completion = {
|
||||
favoriteStaticMembers = {},
|
||||
filteredTypes = { "com.sun.*", "io.micrometer.shaded.*" },
|
||||
},
|
||||
sources = {
|
||||
organizeImports = { starThreshold = 9999, staticStarThreshold = 9999 },
|
||||
},
|
||||
},
|
||||
},
|
||||
init_options = {
|
||||
bundles = {},
|
||||
},
|
||||
}
|
||||
|
||||
require("jdtls").start_or_attach(config)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- Formatting (format-on-save)
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
@@ -163,6 +235,9 @@ return {
|
||||
cpp = { "clang-format" },
|
||||
rust = { "rustfmt" },
|
||||
cs = { "csharpier" },
|
||||
java = { "google-java-format" },
|
||||
python = { "black" },
|
||||
zig = { "zigfmt" },
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
+1
-18
@@ -1,30 +1,13 @@
|
||||
return {
|
||||
{ "nvim-tree/nvim-web-devicons", lazy = true },
|
||||
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("catppuccin").setup({
|
||||
integrations = {
|
||||
treesitter = true,
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
semantic_tokens = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.cmd.colorscheme("catppuccin-mocha")
|
||||
end,
|
||||
},
|
||||
|
||||
-- Statusline
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
require("lualine").setup({
|
||||
options = { theme = "auto", globalstatus = true },
|
||||
options = { theme = "codedark", globalstatus = true },
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
-- ~/.config/nvim/lua/plugins/zeal.lua
|
||||
return {
|
||||
{
|
||||
"KabbAmine/zeavim.vim",
|
||||
cmd = { "Zeavim", "ZeavimV", "Zeal" },
|
||||
keys = {
|
||||
{ "<leader>z", "<cmd>Zeavim<cr>", desc = "Zeal (word under cursor)" },
|
||||
{ "<leader>z", "<cmd>ZeavimV<cr>", mode = "v", desc = "Zeal (selection)" },
|
||||
{ "<leader>Z", "<cmd>Zeal<cr>", desc = "Zeal (input)" },
|
||||
},
|
||||
config = function()
|
||||
vim.g.zv_file_types = {
|
||||
c = "c",
|
||||
cpp = "cpp",
|
||||
rust = "rust",
|
||||
go = "go",
|
||||
lua = "lua",
|
||||
python = "python",
|
||||
javascript = "javascript",
|
||||
typescript = "typescript",
|
||||
java = "java",
|
||||
cs = "csharp",
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user