Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b23f3e26c2 | |||
| 1d9b21bc0c | |||
| 0cbc4ab090 | |||
| 3d14a58707 | |||
| 5c7d1a40fd | |||
| e36e3a757c | |||
| 09fb4348c3 | |||
| 8452ea90e4 | |||
| 399fc584dd | |||
| 1a9e0964e7 | |||
| b62cdc7c64 | |||
| 212cbed679 |
17 changed files with 161 additions and 183 deletions
|
|
@ -23,9 +23,6 @@ column-date = {{.Date.Local}}
|
|||
column-name = {{index (.To | names) 0}}
|
||||
column-subject = {{.ThreadPrefix}}{{.Subject}}
|
||||
|
||||
[ui:account=gs]
|
||||
sidebar-width=30
|
||||
|
||||
[viewer]
|
||||
pager=less -R
|
||||
alternatives=text/plain,text/html
|
||||
|
|
|
|||
|
|
@ -4,16 +4,19 @@ vim.opt.colorcolumn = "120"
|
|||
vim.opt.textwidth = 120
|
||||
|
||||
require('jdtls').start_or_attach({
|
||||
cmd = {'jdtls'},
|
||||
cmd = {
|
||||
'jdtls',
|
||||
'-parameters'
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
require('jdtls').setup_dap({hotcodereplace = 'auto'})
|
||||
require('jdtls.dap').setup_dap_main_class_configs()
|
||||
end,
|
||||
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
||||
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'gradle.properties'}, { upward = true })[1]),
|
||||
init_options = {
|
||||
bundles = {
|
||||
vim.fn.expand("$MASON/share/java-debug-adapter/com.microsoft.java.debug.core.jar"),
|
||||
vim.fn.expand("$MASON/share/java-debug-adapter/com.microsoft.java.debug.plugin.jar"),
|
||||
vim.fn.expand("/usr/share/java-debug/com.microsoft.java.debug.core.jar"),
|
||||
vim.fn.expand("/usr/share/java-debug/com.microsoft.java.debug.plugin.jar"),
|
||||
},
|
||||
},
|
||||
java = {
|
||||
|
|
@ -51,6 +54,17 @@ require('jdtls').start_or_attach({
|
|||
url = "/home/oliver/Dokumente/Gallery Systems/Products/GS Eclipse Formatter Java.xml"
|
||||
},
|
||||
},
|
||||
codeGeneration = {
|
||||
--generateComments = true,
|
||||
insertionLocation = 'lastMember',
|
||||
hashCodeEquals = {
|
||||
useInstanceof = true,
|
||||
useJava7Objects = true,
|
||||
},
|
||||
},
|
||||
telemetry = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ set hidden
|
|||
" Custom shortcuts
|
||||
map gb :bn<cr>
|
||||
map gB :bp<cr>
|
||||
map g# :b#<cr>
|
||||
|
||||
" Close the completion preview window (docstring) automatically
|
||||
autocmd CompleteDone * pclose
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
lazy = true,
|
||||
ft = { "java", "go", "python", "html" },
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer",
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
return {
|
||||
"leoluz/nvim-dap-go",
|
||||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
"https://codeberg.org/mfussenegger/nvim-dap",
|
||||
},
|
||||
lazy = true,
|
||||
ft = { "go" },
|
||||
config = function()
|
||||
require('dap-go').setup()
|
||||
end,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
return {
|
||||
"mfussenegger/nvim-dap-python",
|
||||
"https://codeberg.org/mfussenegger/nvim-dap-python",
|
||||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
"https://codeberg.org/mfussenegger/nvim-dap",
|
||||
},
|
||||
lazy = true,
|
||||
ft = { "python" },
|
||||
config = function()
|
||||
require('dap-python').setup()
|
||||
end,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ return {
|
|||
opts = {},
|
||||
},
|
||||
},
|
||||
lazy = true,
|
||||
ft = { "java", "go", "python" },
|
||||
keys = {
|
||||
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
|
||||
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
"https://codeberg.org/mfussenegger/nvim-dap",
|
||||
lazy = true,
|
||||
ft = { "java", "go", "python" },
|
||||
dependencies = {
|
||||
"rcarriga/nvim-dap-ui",
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
return {
|
||||
"mfussenegger/nvim-jdtls",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim"
|
||||
},
|
||||
"https://codeberg.org/mfussenegger/nvim-jdtls",
|
||||
lazy = true,
|
||||
ft = { "java" },
|
||||
config = function()
|
||||
local dap = require('dap')
|
||||
dap.configurations.java = {{
|
||||
|
|
|
|||
|
|
@ -26,9 +26,6 @@ return {
|
|||
},
|
||||
},
|
||||
config = function()
|
||||
local nvim_lsp = require("lspconfig")
|
||||
|
||||
local protocol = require("vim.lsp.protocol")
|
||||
|
||||
local on_attach = function(client, bufnr)
|
||||
-- Format on save
|
||||
|
|
@ -42,5 +39,91 @@ return {
|
|||
})
|
||||
end
|
||||
end
|
||||
|
||||
-- Typos
|
||||
vim.lsp.config("typos_lsp", {
|
||||
settings = {
|
||||
filetypes = {
|
||||
'java',
|
||||
'go'
|
||||
},
|
||||
},
|
||||
init_options = {
|
||||
diagnosticSeverity = "Hint",
|
||||
}
|
||||
})
|
||||
|
||||
-- Gradle
|
||||
--vim.lsp.enable('gradle_ls')
|
||||
|
||||
-- HTML
|
||||
vim.lsp.enable('html')
|
||||
|
||||
-- CSS
|
||||
vim.lsp.enable('cssls')
|
||||
|
||||
-- JSON
|
||||
vim.lsp.enable('jsonls')
|
||||
|
||||
-- Python
|
||||
vim.lsp.enable('pylsp')
|
||||
|
||||
-- Go
|
||||
vim.lsp.config("gopls", {
|
||||
settings = {
|
||||
gopls = {
|
||||
gofumpt = true,
|
||||
staticcheck = true,
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
unusedresult = true,
|
||||
unusedwrite = true,
|
||||
unusedvariable = true,
|
||||
useany = true,
|
||||
fieldalignment = false,
|
||||
nilness = true,
|
||||
shadow = true,
|
||||
},
|
||||
hints = {
|
||||
assignVariableTypes = true,
|
||||
compositeLiteralFields = true,
|
||||
compositeLiteralTypes = true,
|
||||
constantValues = true,
|
||||
functionTypeParameters = true,
|
||||
parameterNames = true,
|
||||
rangeVariableTypes = true,
|
||||
},
|
||||
codelenses = {
|
||||
gc_details = true,
|
||||
generate = true,
|
||||
regenerate_cgo = true,
|
||||
tidy = true,
|
||||
upgrade_dependency = true,
|
||||
vendor = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
-- Organize imports and format code on save
|
||||
vim.api.nvim_create_autocmd({"BufWritePre"}, {
|
||||
pattern = "*.go",
|
||||
callback = function()
|
||||
local params = vim.lsp.util.make_range_params()
|
||||
params.context = {only = {"source.organizeImports"}}
|
||||
local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params)
|
||||
for cid, res in pairs(result or {}) do
|
||||
for _, r in pairs(res.result or {}) do
|
||||
if r.edit then
|
||||
local enc = (vim.lsp.get_client_by_id(cid) or {}).offset_encoding or "utf-16"
|
||||
vim.lsp.util.apply_workspace_edit(r.edit, enc)
|
||||
end
|
||||
end
|
||||
end
|
||||
vim.lsp.buf.format({async = false})
|
||||
end
|
||||
})
|
||||
|
||||
-- PHP
|
||||
vim.lsp.enable('phpactor')
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,147 +0,0 @@
|
|||
return {
|
||||
"williamboman/mason.nvim",
|
||||
enabled = true,
|
||||
dependencies = {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
},
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"jdtls",
|
||||
"java-debug-adapter",
|
||||
"sonarlint-language-server",
|
||||
"gradle-language-server",
|
||||
"html-lsp",
|
||||
"json-lsp",
|
||||
"typos-lsp"
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup()
|
||||
|
||||
lspconfig = require "lspconfig"
|
||||
|
||||
-- Gradle
|
||||
lspconfig.gradle_ls.setup{}
|
||||
|
||||
-- HTML
|
||||
lspconfig.html.setup{
|
||||
settings = {
|
||||
html = {
|
||||
format = {
|
||||
tabSize = 4,
|
||||
insertSpaces = true,
|
||||
indentEmptyLines = false,
|
||||
indentInnerHtml = true,
|
||||
wrapLineLength = 120,
|
||||
wrapAttributes = 'preserve',
|
||||
wrapAttributesIndentSize = 4,
|
||||
preserveNewLines = true,
|
||||
maxPreserveNewLines = 1,
|
||||
indentScripts = "keep",
|
||||
extraLiners = "",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
-- JSON
|
||||
lspconfig.jsonls.setup{}
|
||||
|
||||
-- Go
|
||||
lspconfig.gopls.setup{
|
||||
settings = {
|
||||
gopls = {
|
||||
gofumpt = true,
|
||||
staticcheck = true,
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
unusedresult = true,
|
||||
unusedwrite = true,
|
||||
unusedvariable = true,
|
||||
useany = true,
|
||||
fieldalignment = false,
|
||||
nilness = true,
|
||||
shadow = true,
|
||||
},
|
||||
hints = {
|
||||
assignVariableTypes = true,
|
||||
compositeLiteralFields = true,
|
||||
compositeLiteralTypes = true,
|
||||
constantValues = true,
|
||||
functionTypeParameters = true,
|
||||
parameterNames = true,
|
||||
rangeVariableTypes = true,
|
||||
},
|
||||
codelenses = {
|
||||
gc_details = true,
|
||||
generate = true,
|
||||
regenerate_cgo = true,
|
||||
tidy = true,
|
||||
upgrade_dependency = true,
|
||||
vendor = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
-- Organize imports and format code on save
|
||||
vim.api.nvim_create_autocmd({"BufWritePre"}, {
|
||||
pattern = "*.go",
|
||||
callback = function()
|
||||
local params = vim.lsp.util.make_range_params()
|
||||
params.context = {only = {"source.organizeImports"}}
|
||||
local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params)
|
||||
for cid, res in pairs(result or {}) do
|
||||
for _, r in pairs(res.result or {}) do
|
||||
if r.edit then
|
||||
local enc = (vim.lsp.get_client_by_id(cid) or {}).offset_encoding or "utf-16"
|
||||
vim.lsp.util.apply_workspace_edit(r.edit, enc)
|
||||
end
|
||||
end
|
||||
end
|
||||
vim.lsp.buf.format({async = false})
|
||||
end
|
||||
})
|
||||
|
||||
-- Python
|
||||
lspconfig.pylsp.setup{
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
autopep8 = {
|
||||
enabled = false,
|
||||
},
|
||||
yapf = {
|
||||
enabled = true,
|
||||
},
|
||||
pylint = {
|
||||
enabled = false,
|
||||
},
|
||||
pyflakes = {
|
||||
enabled = true,
|
||||
},
|
||||
pycodestyle = {
|
||||
enabled = true,
|
||||
ignore = {
|
||||
'E402',
|
||||
'W503',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.typos_lsp.setup({
|
||||
settings = {
|
||||
filetypes = {
|
||||
'java',
|
||||
'go'
|
||||
},
|
||||
},
|
||||
init_options = {
|
||||
diagnosticSeverity = "Info",
|
||||
}
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -6,6 +6,10 @@ return {
|
|||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>tt", "<cmd>Neotree toggle<cr>", desc = "NeoTree toggle" },
|
||||
{ "<leader>tr", "<cmd>Neotree reveal<cr>", desc = "NeoTree reveal" },
|
||||
},
|
||||
config = function()
|
||||
require("neo-tree").setup({
|
||||
window = {
|
||||
|
|
|
|||
|
|
@ -2,21 +2,19 @@ return {
|
|||
{
|
||||
url = "https://gitlab.com/schrieveslaach/sonarlint.nvim",
|
||||
lazy = true,
|
||||
ft = {"java", "go", "html", "python"},
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim"
|
||||
},
|
||||
ft = {"java", "go", "html", "python", "php"},
|
||||
config = function()
|
||||
require('sonarlint').setup({
|
||||
server = {
|
||||
cmd = {
|
||||
'sonarlint-language-server',
|
||||
'sonarlint-ls',
|
||||
'-stdio',
|
||||
'-analyzers',
|
||||
vim.fn.expand("$MASON/share/sonarlint-analyzers/sonarjava.jar"),
|
||||
vim.fn.expand("$MASON/share/sonarlint-analyzers/sonargo.jar"),
|
||||
vim.fn.expand("$MASON/share/sonarlint-analyzers/sonarhtml.jar"),
|
||||
vim.fn.expand("$MASON/share/sonarlint-analyzers/sonarpython.jar"),
|
||||
"/usr/share/java/sonarlint-ls/analyzers/sonarjava.jar",
|
||||
"/usr/share/java/sonarlint-ls/analyzers/sonargo.jar",
|
||||
"/usr/share/java/sonarlint-ls/analyzers/sonarhtml.jar",
|
||||
"/usr/share/java/sonarlint-ls/analyzers/sonarpython.jar",
|
||||
"/usr/share/java/sonarlint-ls/analyzers/sonarphp.jar",
|
||||
},
|
||||
settings = {
|
||||
sonarlint = {
|
||||
|
|
@ -36,9 +34,9 @@ return {
|
|||
'go',
|
||||
'html',
|
||||
'python',
|
||||
"php"
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,25 +1,26 @@
|
|||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
branch = '0.1.x',
|
||||
dependencies = { 'nvim-lua/plenary.nvim', "nvim-telescope/telescope-ui-select.nvim" },
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-telescope/telescope-ui-select.nvim',
|
||||
},
|
||||
keys = {
|
||||
{ "<C-p>", "<cmd>Telescope<cr>" },
|
||||
{ "<C-b>", "<cmd>Telescope buffers<cr>", desc = "Find luffers" },
|
||||
{ "<A-r>", "<cmd>Telescope git_files<CR>", desc = "Find files" },
|
||||
{ "<C-l>", "<cmd>Telescope lsp_document_symbols<CR>", desc = "Find symbols" },
|
||||
{ "<C-d>", "<cmd>lua require('telescope.builtin').diagnostics({severity_limit='WARN'})<CR>", desc = "Show errors and warnings" },
|
||||
},
|
||||
config = function()
|
||||
local t = require("telescope")
|
||||
t.load_extension("ui-select")
|
||||
t.setup({
|
||||
defaults = {
|
||||
preview = false,
|
||||
layout_config = {
|
||||
vertical = {
|
||||
width = 0.5,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
t.load_extension("ui-select")
|
||||
end
|
||||
}
|
||||
|
|
|
|||
8
nvim/lua/plugins/todo-comments.lua
Normal file
8
nvim/lua/plugins/todo-comments.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
opts = {
|
||||
},
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@ return {
|
|||
"lua",
|
||||
"vim",
|
||||
"gitignore",
|
||||
"rust",
|
||||
"go",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
|
|
|
|||
|
|
@ -53,6 +53,16 @@ return {
|
|||
"<cmd>Trouble diagnostics filter.buf=0 filter.severity=vim.diagnostic.severity.HINT<cr>",
|
||||
desc = "Info Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xt",
|
||||
"<cmd>Trouble todo<cr>",
|
||||
desc = "TODOs (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xT",
|
||||
"<cmd>Trouble todo filter.buf=0<cr>",
|
||||
desc = "TODOs (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>cs",
|
||||
"<cmd>Trouble symbols toggle focus=false<cr>",
|
||||
|
|
|
|||
Loading…
Reference in a new issue