initial commit
This commit is contained in:
5
lua/plugins/autotag.lua
Normal file
5
lua/plugins/autotag.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
'windwp/nvim-ts-autotag',
|
||||
lazy = false,
|
||||
config = true,
|
||||
}
|
||||
15
lua/plugins/comment.lua
Normal file
15
lua/plugins/comment.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
'terrortylor/nvim-comment',
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('nvim_comment').setup({
|
||||
hook = function()
|
||||
require('ts_context_commentstring.internal').update_commentstring()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
-- To customize commentstring for e.g. svelte files, as the commentstring is depending on cursor position
|
||||
'JoosepAlviste/nvim-ts-context-commentstring'
|
||||
}
|
||||
}
|
||||
6
lua/plugins/copilot.lua
Normal file
6
lua/plugins/copilot.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"github/copilot.vim",
|
||||
config = function()
|
||||
vim.g.copilot_filetypes = { markdown = true }
|
||||
end,
|
||||
}
|
||||
26
lua/plugins/format.lua
Normal file
26
lua/plugins/format.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
return {
|
||||
'stevearc/conform.nvim',
|
||||
lazy = false,
|
||||
opts = {
|
||||
notify_on_error = true,
|
||||
formatters_by_ft = {
|
||||
svelte = { "prettier" },
|
||||
vue = { "prettier" },
|
||||
},
|
||||
format_on_save = {
|
||||
lsp_fallback = true,
|
||||
timeout_ms = 1500,
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local plug = require('conform')
|
||||
plug.setup(opts)
|
||||
|
||||
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
-- pattern = "*",
|
||||
-- callback = function(args)
|
||||
-- plug.format({ bufnr = args.buf })
|
||||
-- end,
|
||||
-- })
|
||||
end,
|
||||
}
|
||||
38
lua/plugins/lsp-java.lua
Normal file
38
lua/plugins/lsp-java.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
return {
|
||||
'mfussenegger/nvim-jdtls',
|
||||
layz = false,
|
||||
config = function()
|
||||
local home = os.getenv('HOME')
|
||||
local workspace_folder = home .. "/.local/share/eclipse/" .. vim.fn.fnamemodify(root_dir, ":p:h:t")
|
||||
local config = {
|
||||
cmd = {
|
||||
'/usr/bin/java',
|
||||
|
||||
'-Declipse.application=org.eclipse.jdt.ls.core.id1',
|
||||
'-Dosgi.bundles.defaultStartLevel=4',
|
||||
'-Declipse.product=org.eclipse.jdt.ls.core.product',
|
||||
'-Dlog.protocol=true',
|
||||
'-Dlog.level=ALL',
|
||||
'-Xmx1g',
|
||||
'--add-modules=ALL-SYSTEM',
|
||||
'--add-opens', 'java.base/java.util=ALL-UNNAMED',
|
||||
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
|
||||
|
||||
'-javaagent:/usr/share/java/lombok/lombok.jar',
|
||||
|
||||
'-jar', home .. '/.local/share/jdtls/plugins/org.eclipse.equinox.launcher_1.6.500.v20230717-2134.jar',
|
||||
'-configuration', home .. '/.local/share/jdtls/config_linux',
|
||||
|
||||
'-data', workspace_folder
|
||||
},
|
||||
root_dir = vim.fs.dirname(vim.fs.find({ 'gradlew', 'mvnw', '.git' }, { upward = true })[1]),
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "java",
|
||||
callback = function()
|
||||
require('jdtls').start_or_attach(config)
|
||||
end
|
||||
})
|
||||
end,
|
||||
}
|
||||
52
lua/plugins/lsp.lua
Normal file
52
lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
return {
|
||||
{
|
||||
'williamboman/mason.nvim',
|
||||
lazy = false,
|
||||
config = true,
|
||||
},
|
||||
{
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
lazy = false,
|
||||
config = function()
|
||||
local lsp_zero = require('lsp-zero')
|
||||
|
||||
lsp_zero.extend_lspconfig()
|
||||
|
||||
lsp_zero.on_attach(function(_, bufnr)
|
||||
-- see :help lsp-zero-keybindings
|
||||
-- to learn the available actions
|
||||
lsp_zero.default_keymaps({ buffer = bufnr })
|
||||
end)
|
||||
|
||||
require('mason-lspconfig').setup {
|
||||
ensure_installed = { 'rust_analyzer', 'lua_ls', 'kotlin_language_server' },
|
||||
handlers = {
|
||||
lsp_zero.default_setup,
|
||||
kotlin_language_server = function()
|
||||
require('lspconfig').kotlin_language_server.setup({
|
||||
settings = { kotlin = { compiler = { jvm = { target = "17" } } } }
|
||||
})
|
||||
end,
|
||||
} }
|
||||
end,
|
||||
},
|
||||
|
||||
{ 'VonHeikemen/lsp-zero.nvim' },
|
||||
{ 'neovim/nvim-lspconfig' },
|
||||
{ 'hrsh7th/cmp-nvim-lsp' },
|
||||
{
|
||||
'hrsh7th/nvim-cmp',
|
||||
lazy = false,
|
||||
config = function()
|
||||
local cmp = require('cmp')
|
||||
|
||||
cmp.setup({
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
-- add Ctrl+z to default keymap from lsp-zero as replacement to Ctrl+y on german keyboard layout
|
||||
['<C-z>'] = cmp.mapping.confirm({ select = true }),
|
||||
})
|
||||
})
|
||||
end
|
||||
},
|
||||
{ 'L3MON4D3/LuaSnip' },
|
||||
}
|
||||
12
lua/plugins/lualine.lua
Normal file
12
lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
return {
|
||||
-- status line
|
||||
'nvim-lualine/lualine.nvim',
|
||||
lazy = false,
|
||||
config = true,
|
||||
opts = {
|
||||
options = {
|
||||
theme = "everforest",
|
||||
},
|
||||
},
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' }
|
||||
}
|
||||
4
lua/plugins/maven.lua
Normal file
4
lua/plugins/maven.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
-- 'TimsDevCorner/vim-maven-plugin',
|
||||
-- lazy = false
|
||||
}
|
||||
7
lua/plugins/notify.lua
Normal file
7
lua/plugins/notify.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
'rcarriga/nvim-notify',
|
||||
lazy = false,
|
||||
config = function()
|
||||
vim.notify = require('notify')
|
||||
end,
|
||||
}
|
||||
16
lua/plugins/oil.lua
Normal file
16
lua/plugins/oil.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
'stevearc/oil.nvim',
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('oil').setup({
|
||||
view_options = {
|
||||
show_hidden = true,
|
||||
sort = {
|
||||
{ "type", "asc" },
|
||||
{ "name", "asc" },
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
|
||||
end,
|
||||
}
|
||||
10
lua/plugins/telescope.lua
Normal file
10
lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
tag = '0.1.3',
|
||||
opts = {
|
||||
defaults = {
|
||||
path_display = { "smart" },
|
||||
}
|
||||
},
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
}
|
||||
7
lua/plugins/theme-everforest.lua
Normal file
7
lua/plugins/theme-everforest.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"sainnhe/everforest",
|
||||
priority = 1000, -- make sure to load this before all the other start plugins
|
||||
config = function()
|
||||
vim.cmd([[colorscheme everforest]])
|
||||
end,
|
||||
}
|
||||
15
lua/plugins/theme_tokyonight.lua
Normal file
15
lua/plugins/theme_tokyonight.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
-- "folke/tokyonight.nvim",
|
||||
-- lazy = false,
|
||||
-- priority = 1000,
|
||||
-- opts = {
|
||||
-- style = "moon",
|
||||
-- on_colors = function(colors)
|
||||
-- colors.fg_gutter = colors.orange
|
||||
-- end,
|
||||
-- },
|
||||
-- config = function(_, opts)
|
||||
-- require('tokyonight').setup(opts)
|
||||
-- vim.cmd([[colorscheme tokyonight]])
|
||||
-- end,
|
||||
}
|
||||
12
lua/plugins/treesitter.lua
Normal file
12
lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup {
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
}
|
||||
vim.cmd([[TSUpdate]])
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user