Compare commits
29 changed files with 70 additions and 671 deletions
|
|
@ -52,7 +52,6 @@ N = :prev-result<Enter>
|
||||||
u = :unread -t<Enter>
|
u = :unread -t<Enter>
|
||||||
|
|
||||||
t = :mark -t<Enter>
|
t = :mark -t<Enter>
|
||||||
at = :mark -a<Enter>
|
|
||||||
|
|
||||||
[view]
|
[view]
|
||||||
q = :close<Enter>
|
q = :close<Enter>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
vim.opt.spell = true
|
|
||||||
vim.opt.spelllang = "en_us"
|
|
||||||
vim.opt.colorcolumn = "120"
|
|
||||||
vim.opt.textwidth = 120
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
vim.opt.spell = true
|
|
||||||
vim.opt.spelllang = "en_us"
|
|
||||||
vim.opt.colorcolumn = "120"
|
|
||||||
vim.opt.textwidth = 120
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
setlocal colorcolumn=72
|
|
||||||
setlocal formatoptions+=aw
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
vim.opt.spell = true
|
|
||||||
vim.opt.spelllang = "en_us"
|
|
||||||
vim.opt.colorcolumn = "80"
|
|
||||||
vim.opt.textwidth = 80
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
vim.opt.spell = true
|
|
||||||
vim.opt.spelllang = "en_us"
|
|
||||||
vim.opt.colorcolumn = "120"
|
|
||||||
vim.opt.textwidth = 80
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
setlocal wrap
|
|
||||||
setlocal linebreak
|
|
||||||
setlocal nonumber
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
-- Bootstrap lazy.nvim
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
|
||||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
|
||||||
if vim.v.shell_error ~= 0 then
|
|
||||||
vim.api.nvim_echo({
|
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
|
||||||
{ out, "WarningMsg" },
|
|
||||||
{ "\nPress any key to exit..." },
|
|
||||||
}, true, {})
|
|
||||||
vim.fn.getchar()
|
|
||||||
os.exit(1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
|
||||||
-- loading lazy.nvim so that mappings are correct.
|
|
||||||
-- This is also a good place to setup other settings (vim.opt)
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
vim.g.maplocalleader = "\\"
|
|
||||||
|
|
||||||
-- Setup lazy.nvim
|
|
||||||
require("lazy").setup({
|
|
||||||
spec = {
|
|
||||||
-- import your plugins
|
|
||||||
{ import = "plugins" },
|
|
||||||
},
|
|
||||||
-- Configure any other settings here. See the documentation for more details.
|
|
||||||
-- colorscheme that will be used when installing plugins.
|
|
||||||
install = { colorscheme = { "habamax" } },
|
|
||||||
-- automatically check for plugin updates
|
|
||||||
checker = { enabled = false },
|
|
||||||
})
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
return {
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
event = "InsertEnter",
|
|
||||||
dependencies = {
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local cmp = require("cmp")
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
|
||||||
["<C-e>"] = cmp.mapping.close(),
|
|
||||||
["<CR>"] = cmp.mapping.confirm({
|
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
|
||||||
select = true,
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "buffer" },
|
|
||||||
{ name = "path" },
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.cmd([[
|
|
||||||
set completeopt=menuone,noinsert,noselect
|
|
||||||
highlight! default link CmpItemKind CmpItemMenuDefault
|
|
||||||
]])
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"ellisonleao/gruvbox.nvim",
|
|
||||||
priority = 1000 ,
|
|
||||||
config = true,
|
|
||||||
init = function()
|
|
||||||
require("gruvbox").setup({
|
|
||||||
contrast = "hard",
|
|
||||||
hls_cursor = "red",
|
|
||||||
})
|
|
||||||
vim.cmd("colorscheme gruvbox")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
return {
|
|
||||||
"leoluz/nvim-dap-go",
|
|
||||||
dependencies = {
|
|
||||||
"mfussenegger/nvim-dap",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require('dap-go').setup()
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
return {
|
|
||||||
"mfussenegger/nvim-dap-python",
|
|
||||||
dependencies = {
|
|
||||||
"mfussenegger/nvim-dap",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require('dap-python').setup()
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
return {
|
|
||||||
"rcarriga/nvim-dap-ui",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-neotest/nvim-nio",
|
|
||||||
{
|
|
||||||
"theHamsta/nvim-dap-virtual-text",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
|
|
||||||
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
|
|
||||||
},
|
|
||||||
opts = {},
|
|
||||||
config = function(_, opts)
|
|
||||||
local dap = require("dap")
|
|
||||||
local dapui = require("dapui")
|
|
||||||
dapui.setup(opts)
|
|
||||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
|
||||||
dapui.open({})
|
|
||||||
end
|
|
||||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
|
||||||
dapui.close({})
|
|
||||||
end
|
|
||||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
|
||||||
dapui.close({})
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
return {
|
|
||||||
"mfussenegger/nvim-dap",
|
|
||||||
dependencies = {
|
|
||||||
"rcarriga/nvim-dap-ui",
|
|
||||||
{
|
|
||||||
"theHamsta/nvim-dap-virtual-text",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<F11>", function() require("dap").continue() end, desc = "Continue" },
|
|
||||||
{ "<F6>", function() require("dap").step_over() end, desc = "Step over" },
|
|
||||||
{ "<F5>", function() require("dap").step_into() end, desc = "Step into" },
|
|
||||||
{ "<F12>", function() require("dap").step_out() end, desc = "Step out" },
|
|
||||||
{ "<space>b", function() require("dap").toggle_breakpoint() end, desc = "Toggle " },
|
|
||||||
{ "<leader>d", "", desc = "+debug", mode = {"n", "v"} },
|
|
||||||
{ "<leader>dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" },
|
|
||||||
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
|
|
||||||
{ "<leader>dc", function() require("dap").continue() end, desc = "Continue" },
|
|
||||||
{ "<leader>da", function() require("dap").continue({ before = get_args }) end, desc = "Run with Args" },
|
|
||||||
{ "<leader>dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" },
|
|
||||||
{ "<leader>dg", function() require("dap").goto_() end, desc = "Go to Line (No Execute)" },
|
|
||||||
{ "<leader>di", function() require("dap").step_into() end, desc = "Step Into" },
|
|
||||||
{ "<leader>dj", function() require("dap").down() end, desc = "Down" },
|
|
||||||
{ "<leader>dk", function() require("dap").up() end, desc = "Up" },
|
|
||||||
{ "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" },
|
|
||||||
{ "<leader>do", function() require("dap").step_out() end, desc = "Step Out" },
|
|
||||||
{ "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" },
|
|
||||||
{ "<leader>dp", function() require("dap").pause() end, desc = "Pause" },
|
|
||||||
{ "<leader>dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
|
|
||||||
{ "<leader>ds", function() require("dap").session() end, desc = "Session" },
|
|
||||||
{ "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" },
|
|
||||||
{ "<leader>dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
return {
|
|
||||||
"lewis6991/gitsigns.nvim",
|
|
||||||
config = function()
|
|
||||||
require("gitsigns").setup()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
return {
|
|
||||||
"mfussenegger/nvim-jdtls",
|
|
||||||
dependencies = {
|
|
||||||
"williamboman/mason.nvim"
|
|
||||||
},
|
|
||||||
ft = "java",
|
|
||||||
config = function()
|
|
||||||
local jdtlsConfig = {
|
|
||||||
cmd = {'jdtls'},
|
|
||||||
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]),
|
|
||||||
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"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
java = {
|
|
||||||
autobuild = {
|
|
||||||
enabled = true
|
|
||||||
},
|
|
||||||
debug = {
|
|
||||||
settings = {
|
|
||||||
hotCodeReplace = 'auto'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
settings = {
|
|
||||||
java = {
|
|
||||||
autobuild = {
|
|
||||||
enabled = true
|
|
||||||
},
|
|
||||||
debug = {
|
|
||||||
settings = {
|
|
||||||
hotCodeReplace = 'auto'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
saveActions = {
|
|
||||||
organizeImports = true
|
|
||||||
},
|
|
||||||
signatureHelp = {
|
|
||||||
enabled = false,
|
|
||||||
description = {
|
|
||||||
enabled = false
|
|
||||||
},
|
|
||||||
},
|
|
||||||
format = {
|
|
||||||
enable = true,
|
|
||||||
settings = {
|
|
||||||
url = "/home/oliver/Dokumente/Gallery Systems/Products/GS Eclipse Formatter Java.xml"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local dap = require('dap')
|
|
||||||
dap.configurations.java = {{
|
|
||||||
type = 'java',
|
|
||||||
request = 'attach',
|
|
||||||
name = 'Debug (Attach) port 5005',
|
|
||||||
hostName = '127.0.0.1',
|
|
||||||
port = 5005,
|
|
||||||
},{
|
|
||||||
type = 'java',
|
|
||||||
request = 'attach',
|
|
||||||
name = 'Debug (Attach) port 5006',
|
|
||||||
hostName = '127.0.0.1',
|
|
||||||
port = 5006,
|
|
||||||
},{
|
|
||||||
type = 'java',
|
|
||||||
request = 'attach',
|
|
||||||
name = 'Debug (Attach) port 5105',
|
|
||||||
hostName = '127.0.0.1',
|
|
||||||
port = 5105,
|
|
||||||
}}
|
|
||||||
|
|
||||||
require('jdtls').start_or_attach(jdtlsConfig)
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
return {
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
|
||||||
dependencies = {
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<space>e", vim.diagnostic.open_float },
|
|
||||||
{ "[d", vim.diagnostic.goto_prev },
|
|
||||||
{ "]d", vim.diagnostic.goto_next },
|
|
||||||
{ "<space>q", vim.diagnostic.setloclist },
|
|
||||||
{ "gD", vim.lsp.buf.declaration },
|
|
||||||
{ "gd", vim.lsp.buf.definition },
|
|
||||||
{ "K", vim.lsp.buf.hover },
|
|
||||||
{ "gi", vim.lsp.buf.implementation },
|
|
||||||
{ "<C-k>", vim.lsp.buf.signature_help },
|
|
||||||
{ "<space>D", vim.lsp.buf.type_definition },
|
|
||||||
{ "<space>rn", vim.lsp.buf.rename },
|
|
||||||
{ "<space>ca", vim.lsp.buf.code_action },
|
|
||||||
{ "gr", vim.lsp.buf.references },
|
|
||||||
{
|
|
||||||
"<space>f",
|
|
||||||
function()
|
|
||||||
vim.lsp.buf.format { async = true }
|
|
||||||
end
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local nvim_lsp = require("lspconfig")
|
|
||||||
|
|
||||||
local protocol = require("vim.lsp.protocol")
|
|
||||||
|
|
||||||
local on_attach = function(client, bufnr)
|
|
||||||
-- Format on save
|
|
||||||
if client.server_capabilities.documentFormattingProvider then
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
|
||||||
group = vim.api.nvim_create_augroup("Format", { clear = true }),
|
|
||||||
buffer = bufnr,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.buf.format()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
return {
|
|
||||||
"nvim-lualine/lualine.nvim",
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
||||||
config = function()
|
|
||||||
require("lualine").setup()
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
@ -1,129 +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{}
|
|
||||||
|
|
||||||
-- 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,
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
return {
|
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
|
||||||
branch = "v3.x",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"nvim-tree/nvim-web-devicons",
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require("neo-tree").setup({
|
|
||||||
window = {
|
|
||||||
position = "left",
|
|
||||||
width = 50,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue