22 Commits

Author SHA1 Message Date
anth64 7322bc0f73 use lspconfig 2025-04-15 22:21:09 +02:00
anth64 5577628a22 reorderd lazy and config 2025-04-15 20:08:14 +02:00
anth64 7f1a3b82da add colorschemes, default to moonfly 2025-04-15 19:29:43 +02:00
anth64 466c8cf410 make it work on windows as well 2025-04-15 18:51:56 +02:00
anth64 a9d9c2199d added jdtls and newline to end of files 2025-04-11 07:26:54 +02:00
anth64 4db9e65e6f remove redundant remap of mapleader 2025-04-10 22:33:16 +02:00
anth64 bb0ad9af1b readd telescope and harpoon 2025-04-10 22:28:45 +02:00
anth64 1a56e26e6b redid mapping, set and util, also readded nvim-cmp and cmp-nvim-lsp 2025-04-10 22:20:12 +02:00
anth64 690e575c03 make sure that colorscheme is not touched 2025-04-09 23:23:51 +02:00
anth64 0ab0b593f2 add lazy.nvim and lualine plugin 2025-04-09 22:56:58 +02:00
anth64 a8dd286e39 initial configuration 2025-04-09 07:59:00 +02:00
anth64 e7334a67d3 added yaml language server 2025-03-15 11:30:25 +01:00
anth64 40c7ea6cc3 more sensible defaults for basedpyright 2025-03-06 12:56:17 +01:00
anth64 98dc6f8d64 add basedpyright 2025-02-10 10:57:15 +01:00
anth64 aa18999cc2 add ccls 2024-12-19 19:40:03 +01:00
anth64 3f69af1125 display errors on hover 2024-12-19 19:39:49 +01:00
anth64 67a1cb3237 force unix file formats 2024-12-18 09:24:06 +01:00
anth64 f8af12905f force unix file format 2024-12-03 22:13:31 +01:00
anth64 eb50cc0a34 fixed issue where auto-complete was borked... 2024-12-03 21:57:52 +01:00
anth64 9feaa4d770 make sure home dir is set properly. 2024-12-03 20:58:01 +01:00
anth64 6538d1c611 add jdtls. 2024-12-03 20:48:51 +01:00
anth64 ac570f7599 CRLF -> LF 2024-12-03 20:36:44 +01:00
20 changed files with 133 additions and 175 deletions
+1 -2
View File
@@ -1,2 +1 @@
plugin/packer_compiled.lua
workspace/
lazy-lock.json
+1
View File
@@ -3,3 +3,4 @@
[ripgrep](https://github.com/BurntSushi/ripgrep) is required for this to work.
My configuration for Neovim.
-20
View File
@@ -1,20 +0,0 @@
require('tokyonight').setup({
style = "night",
styles = {
comments = { italic = false },
keywords = { italic = false }
}
})
require('night-owl').setup({
transparent_background = true
})
function ColorMyPencils(color)
color = color or 'default'
vim.cmd.colorscheme(color)
-- vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
-- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end
ColorMyPencils('night-owl')
-1
View File
@@ -1 +0,0 @@
vim.keymap.set("n", "<leader>gs", vim.cmd.Git);
-10
View File
@@ -1,10 +0,0 @@
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)
-48
View File
@@ -1,48 +0,0 @@
local lsp = require('lsp-zero')
lsp.preset('recommended')
lsp.setup_servers({
'basedpyright',
'bashls',
'jsonls',
'ccls',
'csharp_ls',
'gopls',
'html',
'htmx',
'lua_ls',
'ruby_lsp',
'rust_analyzer',
'yamlls'
})
local cmp = require('cmp')
local cmp_select = { behavior = cmp.SelectBehavior.Select }
local cmp_mappings = lsp.defaults.cmp_mappings({
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<C-y>'] = cmp.mapping.confirm({ select = true }),
["<C-Space>"] = cmp.mapping.complete(),
})
lsp.set_preferences({
sign_icons = {}
})
lsp.setup({
mapping = cmp_mappings
})
lsp.on_attach(function(client, bufnr)
local opts = { buffer = bufnr, remap = false }
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("n", "<leader>vws", function() vim.diagnostic.workspace_symbol() end, opts)
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
vim.keymap.set("i", "<C-h>", function() end, opts)
end)
-1
View File
@@ -1 +0,0 @@
require('lualine').setup()
-6
View File
@@ -1,6 +0,0 @@
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
vim.keymap.set('n', '<leader>ps', function()
builtin.grep_string({ search = vim.fn.input("Grep > ") });
end)
-21
View File
@@ -1,21 +0,0 @@
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the five listed parsers should always be installed)
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "rust", "java", "javascript", "typescript", "bash" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
highlight = {
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}
-1
View File
@@ -1 +0,0 @@
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
+2 -1
View File
@@ -1,5 +1,6 @@
local config = {
cmd = {'/home/anth/.local/share/java/jdtls/bin/jdtls'},
cmd = { os.getenv('HOME') .. '/.local/share/java/jdtls/bin/jdtls' },
root_dir = vim.fs.dirname(vim.fs.find({ 'gradlew', '.git', 'mvnw' }, { upward = true })[1]),
}
require('jdtls').start_or_attach(config)
+18 -1
View File
@@ -1 +1,18 @@
require("anth64")
require("config.lazy")
require("config.set")
require("config.remap")
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'
-2
View File
@@ -1,2 +0,0 @@
require("anth64.set")
require("anth64.remap")
-48
View File
@@ -1,48 +0,0 @@
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use {
'nvim-telescope/telescope.nvim', tag = '0.1.4',
-- or , branch = '0.1.x',
requires = { {'nvim-lua/plenary.nvim'} }
}
use('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'})
use('nvim-treesitter/playground')
use('theprimeagen/harpoon')
use('mbbill/undotree')
use('tpope/vim-fugitive')
use {
'VonHeikemen/lsp-zero.nvim',
branch = 'v3.x',
requires = {
-- LSP Support
{'neovim/nvim-lspconfig'},
-- Autocompletion
{'hrsh7th/nvim-cmp'},
{'hrsh7th/cmp-nvim-lsp'},
{'L3MON4D3/LuaSnip'},
}
}
use('mfussenegger/nvim-jdtls')
-- Color schemes.
use({
'folke/tokyonight.nvim',
as = 'tokyonight',
})
use({
"oxfist/night-owl.nvim",
as = 'night-owl',
})
-- Status bar
use {
'nvim-lualine/lualine.nvim',
requires = { 'nvim-tree/nvim-web-devicons', opt = true }
}
end)
+34
View File
@@ -0,0 +1,34 @@
-- 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.
-- automatically check for plugin updates
checker = { enabled = true },
})
@@ -1,2 +1,2 @@
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
+11 -11
View File
@@ -1,27 +1,26 @@
vim.opt.shell = "zsh"
vim.opt.fileformat = "unix"
vim.opt.fileformats = "unix"
vim.opt.cmdheight = 0
vim.opt.guicursor = ""
vim.opt.mouse = ""
vim.opt.nu = true
vim.opt.number = 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.wrap = false
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
local home = os.getenv("HOME") or os.getenv("USERPROFILE")
vim.opt.undodir = home .. "/.vim/undodir"
vim.opt.undofile = true
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")
@@ -29,6 +28,7 @@ vim.opt.isfname:append("@-@")
vim.opt.updatetime = 50
vim.opt.colorcolumn = "80"
vim.g.c_syntax_for_h = 1
vim.g.mapleader = " "
vim.cmd.colorscheme("moonfly")
+8
View File
@@ -0,0 +1,8 @@
return {
{ "neovim/nvim-lspconfig" },
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
{ "hrsh7th/nvim-cmp" },
{ "hrsh7th/cmp-nvim-lsp" },
{ "mfussenegger/nvim-jdtls" } -- jdtls bindings for neovim
}
+42
View File
@@ -0,0 +1,42 @@
return {
{
"mbbill/undotree",
config = function()
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
end,
},
{
"tpope/vim-fugitive",
config = function()
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
end,
},
{
"nvim-telescope/telescope.nvim",
dependencies = {"nvim-lua/plenary.nvim"},
config = function()
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
vim.keymap.set('n', '<leader>ps', function()
builtin.grep_string({ search = vim.fn.input("Grep > ") });
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
}
}
+14
View File
@@ -0,0 +1,14 @@
return {
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
lazy = false,
config = function()
require("lualine").setup()
end,
},
{ "bluz71/vim-moonfly-colors", lazy = false },
{ "EdenEast/nightfox.nvim", lazy = false },
{ "oxfist/night-owl.nvim", lazy = false },
}