Add fold capa / remove ondarker plugin / add correct jdtls support

This commit is contained in:
Alessandro
2024-09-03 16:23:41 +02:00
parent 6225c2d87d
commit e95226daa6
7 changed files with 51 additions and 43 deletions

View File

@@ -65,7 +65,9 @@ M.base46 = {
["@module"] = { fg = "yellow" },
["@constant"] = { fg = "orange" },
["Include"] = { fg = "purple" },
["@keyword.exception"] = { fg = "purple" },
["@string.escape"] = { fg = "red" },
["Special"] = { fg = "red" },
@@ -73,10 +75,15 @@ M.base46 = {
["@punctuation.bracket"] = { fg = "light_grey" },
["@punctuation.delimiter"] = { fg = "light_grey" },
["@tag.delimiter"] = { fg = "light_grey" },
["Delimiter"] = { fg = "light_grey" },
["Function"] = { bold = true },
["@function"] = { bold = true },
["@function.builtin"] = { bold = true },
["@function.call"] = { bold = true },
["@function.method"] = { bold = true },
["@function.method.call"] = { bold = true },
["@constructor"] = { bold = true },
["@keyword"] = { italic = true },
["@keyword.function"] = { bold = true },

View File

@@ -3,22 +3,18 @@ require("nvchad.configs.lspconfig").defaults()
local lspconfig = require "lspconfig"
-- EXAMPLE
local servers = { "html", "cssls" }
local nvlsp = require "nvchad.configs.lspconfig"
lspconfig.rust_analyzer.setup {
settings = {
["rust-analyzer"] = {
inlayHints = {
parameterHints = {
enable = false,
},
},
},
},
}
-- lsps with default config
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = nvlsp.on_attach,
on_init = nvlsp.on_init,
capabilities = nvlsp.capabilities,
}
end
-- configuring single server, example: typescript
-- lspconfig.tsserver.setup {
-- on_attach = nvlsp.on_attach,
-- on_init = nvlsp.on_init,
-- capabilities = nvlsp.capabilities,
-- }
local lombok = vim.fn.stdpath('data') .. '/mason/packages/jdtls/lombok.jar'
lspconfig.jdtls.setup { cmd = { "jdtls", "--jvm-arg=-javaagent:" .. lombok } }

View File

@@ -6,3 +6,19 @@ require "nvchad.options"
-- o.cursorlineopt ='both' -- to enable cursorline!
vim.lsp.inlay_hint.enable(true)
vim.o.foldcolumn = '0' -- '0' is not bad
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
vim.o.foldlevelstart = 99
vim.o.foldenable = true
vim.opt.fillchars = {
vert = "", -- alternatives │
fold = " ",
eob = " ", -- suppress ~ at EndOfBuffer
diff = "", -- alternatives = ⣿ ░ ─
msgsep = "",
foldopen = "",
foldsep = "",
foldclose = "",
}

View File

@@ -1,18 +1,14 @@
return {
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
opts = require "configs.conform",
},
-- These are some examples, uncomment them if you want to see them work!
{
"neovim/nvim-lspconfig",
config = function()
require "configs.lspconfig"
end,
},
{
"Pocco81/auto-save.nvim",
config = function()
@@ -20,7 +16,6 @@ return {
end,
lazy = false,
},
{
"nvim-treesitter/nvim-treesitter",
opts = require "configs.default-ts",
@@ -32,4 +27,4 @@ return {
"nvim-tree/nvim-tree.lua",
opts = require "configs.nvim-tree",
},
}
}

View File

@@ -1,19 +0,0 @@
return {
"navarasu/onedark.nvim",
lazy = false,
config = function()
require("onedark").setup {
style = "darker", -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
toggle_style_key = "<leader>ss",
transparent = false, -- Show/hide background
code_style = {
comments = "italic",
keywords = "italic,",
functions = "bold",
strings = "none",
variables = "none",
},
}
end,
}

12
nvim/lua/plugins/ufo.lua Normal file
View File

@@ -0,0 +1,12 @@
return {
"kevinhwang91/nvim-ufo",
config = function()
require("ufo").setup {
provider_selector = function(bufnr, filetype, buftype)
return { "treesitter", "indent" }
end,
}
end,
lazy = false,
dependencies = { "kevinhwang91/promise-async" },
}