Squashed commit of the following:

commit 7322bc0f73
Author: anth64 <anth64@protonmail.com>
Date:   Tue Apr 15 22:21:09 2025 +0200

    use lspconfig

commit 5577628a22
Author: anth64 <anth64@protonmail.com>
Date:   Tue Apr 15 20:08:14 2025 +0200

    reorderd lazy and config

commit 7f1a3b82da
Author: anth64 <anth64@protonmail.com>
Date:   Tue Apr 15 19:29:43 2025 +0200

    add colorschemes, default to moonfly

commit 466c8cf410
Author: anth64 <anth64@protonmail.com>
Date:   Tue Apr 15 18:51:56 2025 +0200

    make it work on windows as well

commit a9d9c2199d
Author: anth64 <anth64@protonmail.com>
Date:   Fri Apr 11 07:26:54 2025 +0200

    added jdtls and newline to end of files

commit 4db9e65e6f
Author: anth64 <anth64@protonmail.com>
Date:   Thu Apr 10 22:33:16 2025 +0200

    remove redundant remap of mapleader

commit bb0ad9af1b
Author: anth64 <anth64@protonmail.com>
Date:   Thu Apr 10 22:28:45 2025 +0200

    readd telescope and harpoon

commit 1a56e26e6b
Author: anth64 <anth64@protonmail.com>
Date:   Thu Apr 10 22:20:12 2025 +0200

    redid mapping, set and util, also readded nvim-cmp and cmp-nvim-lsp

commit 690e575c03
Author: anth64 <anth64@protonmail.com>
Date:   Wed Apr 9 23:23:51 2025 +0200

    make sure that colorscheme is not touched

commit 0ab0b593f2
Author: anth64 <anth64@protonmail.com>
Date:   Wed Apr 9 22:56:58 2025 +0200

    add lazy.nvim and lualine plugin

commit a8dd286e39
Author: anth64 <anth64@protonmail.com>
Date:   Wed Apr 9 07:59:00 2025 +0200

    initial configuration
This commit is contained in:
2025-04-16 07:41:42 +02:00
parent b7e3d43782
commit 6c9250d1da
9 changed files with 83 additions and 153 deletions
+1
View File
@@ -3,3 +3,4 @@
[ripgrep](https://github.com/BurntSushi/ripgrep) is required for this to work. [ripgrep](https://github.com/BurntSushi/ripgrep) is required for this to work.
My configuration for Neovim. My configuration for Neovim.
+1
View File
@@ -3,3 +3,4 @@ local config = {
root_dir = vim.fs.dirname(vim.fs.find({ 'gradlew', '.git', 'mvnw' }, { upward = true })[1]), root_dir = vim.fs.dirname(vim.fs.find({ 'gradlew', '.git', 'mvnw' }, { upward = true })[1]),
} }
require('jdtls').start_or_attach(config) require('jdtls').start_or_attach(config)
+16 -1
View File
@@ -1,3 +1,18 @@
require("config.lazy")
require("config.set") require("config.set")
require("config.remap") require("config.remap")
require("config.lazy")
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(ev)
local client = vim.lsp.get_client_by_id(ev.data.client_id)
if client:supports_method('textDocument/completion') then
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
end
end,
})
vim.lsp.enable({'basedpyright', 'lua_ls', 'yamlls'})
vim.cmd("set completeopt+=noselect")
vim.o.winborder='rounded'
+1 -2
View File
@@ -28,8 +28,7 @@ require("lazy").setup({
{ import = "plugins" }, { import = "plugins" },
}, },
-- Configure any other settings here. See the documentation for more details. -- 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 -- automatically check for plugin updates
checker = { enabled = true }, checker = { enabled = true },
}) })
+1 -1
View File
@@ -1,2 +1,2 @@
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex) vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
+7 -20
View File
@@ -1,29 +1,15 @@
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { vim.opt.shell = "zsh"
group = vim.api.nvim_create_augroup("float_diagnostic_cursor", { clear = true }), vim.opt.fileformat = "unix"
callback = function () vim.opt.fileformats = "unix"
vim.diagnostic.open_float(nil, {focus=false, scope="cursor"})
end
})
vim.opt.shell="zsh"
vim.opt.fileformat="unix"
vim.opt.fileformats="unix"
vim.opt.cmdheight = 0 vim.opt.cmdheight = 0
vim.opt.guicursor = "" vim.opt.guicursor = ""
vim.opt.mouse = "" vim.opt.mouse = ""
vim.opt.nu = true vim.opt.number = true
vim.opt.relativenumber = true vim.opt.relativenumber = true
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.smartindent = true vim.opt.smartindent = true
vim.opt.wrap = false
vim.opt.swapfile = false vim.opt.swapfile = false
vim.opt.backup = false vim.opt.backup = false
local home = os.getenv("HOME") or os.getenv("USERPROFILE") local home = os.getenv("HOME") or os.getenv("USERPROFILE")
@@ -34,6 +20,7 @@ vim.opt.hlsearch = false
vim.opt.incsearch = true vim.opt.incsearch = true
vim.opt.termguicolors = true vim.opt.termguicolors = true
vim.opt.scrolloff = 8 vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes" vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@") vim.opt.isfname:append("@-@")
@@ -41,7 +28,7 @@ vim.opt.isfname:append("@-@")
vim.opt.updatetime = 50 vim.opt.updatetime = 50
vim.opt.colorcolumn = "80" vim.opt.colorcolumn = "80"
vim.g.c_syntax_for_h = 1 vim.g.c_syntax_for_h = 1
vim.g.mapleader = " "
vim.cmd.colorscheme("moonfly")
+5 -73
View File
@@ -1,76 +1,8 @@
return { return {
{ "neovim/nvim-lspconfig" },
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
{ "mfussenegger/nvim-jdtls" }, { "hrsh7th/nvim-cmp" },
{ { "hrsh7th/cmp-nvim-lsp" },
"neovim/nvim-lspconfig", { "mfussenegger/nvim-jdtls" } -- jdtls bindings for neovim
config = function()
local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup {}
lspconfig.ccls.setup {}
lspconfig.basedpyright.setup {
settings = {
basedpyright = {
analysis = {
typeCheckingMode = "basic",
inlayHints = { callArgumentNames = true }
}
}
}
}
lspconfig.yamlls.setup {}
end,
},
{
"VonHeikemen/lsp-zero.nvim",
dependencies = {
"neovim/nvim-lspconfig",
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-nvim-lsp"
},
config = function()
vim.opt.signcolumn = 'yes'
local lspconfig_defaults = require('lspconfig').util.default_config
lspconfig_defaults.capabilities = vim.tbl_deep_extend(
'force',
lspconfig_defaults.capabilities,
require('cmp_nvim_lsp').default_capabilities()
)
vim.api.nvim_create_autocmd('LspAttach', {
desc = 'LSP actions',
callback = function(event)
local opts = { buffer = event.buf }
vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
vim.keymap.set('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>', opts)
vim.keymap.set({ 'n', 'x' }, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts)
vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts)
end,
})
local lspconfig = require('lspconfig')
lspconfig.lua_ls.setup{}
local cmp = require('cmp')
cmp.setup({
sources = {
{ name = 'nvim_lsp' },
},
snippet = {
expand = function(args)
vim.snippet.expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({}),
})
end,
}
} }
+16 -15
View File
@@ -1,19 +1,4 @@
return { return {
{
"theprimeagen/harpoon",
config = function()
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)
end,
},
{ {
"mbbill/undotree", "mbbill/undotree",
config = function() config = function()
@@ -37,5 +22,21 @@ return {
builtin.grep_string({ search = vim.fn.input("Grep > ") }); builtin.grep_string({ search = vim.fn.input("Grep > ") });
end) end)
end, end,
},
{
"theprimeagen/harpoon",
config = function()
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)
end
} }
} }
+5 -11
View File
@@ -1,14 +1,4 @@
return { return {
{
"oxfist/night-owl.nvim",
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
-- load the colorscheme here
require("night-owl").setup()
vim.cmd.colorscheme("night-owl")
end,
},
{ {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" }, dependencies = { "nvim-tree/nvim-web-devicons" },
@@ -16,5 +6,9 @@ return {
config = function() config = function()
require("lualine").setup() require("lualine").setup()
end, end,
} },
{ "bluz71/vim-moonfly-colors", lazy = false },
{ "EdenEast/nightfox.nvim", lazy = false },
{ "oxfist/night-owl.nvim", lazy = false },
} }