1 Commits

Author SHA1 Message Date
anth64 3fd7015da8 base version of conversion. 2024-12-03 20:24:06 +01:00
15 changed files with 180 additions and 229 deletions
-1
View File
@@ -3,4 +3,3 @@
[ripgrep](https://github.com/BurntSushi/ripgrep) is required for this to work.
My configuration for Neovim.
-3
View File
@@ -1,3 +0,0 @@
vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 4
vim.opt_local.tabstop = 4
-3
View File
@@ -1,3 +0,0 @@
vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 2
vim.opt_local.tabstop = 2
-11
View File
@@ -1,11 +0,0 @@
vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 4
vim.opt_local.tabstop = 4
local home = os.getenv("HOME") or os.getenv("USERPROFILE")
local config = {
cmd = { 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)
-3
View File
@@ -1,3 +0,0 @@
vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 2
vim.opt_local.tabstop = 2
-3
View File
@@ -1,3 +0,0 @@
vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 4
vim.opt_local.tabstop = 4
-3
View File
@@ -1,3 +0,0 @@
vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 2
vim.opt_local.tabstop = 2
+1 -19
View File
@@ -1,21 +1,3 @@
require("config.lazy")
require("config.set")
require("config.remap")
vim.cmd("set completeopt+=noselect")
vim.lsp.enable({
'basedpyright',
'clangd',
'csharp_ls',
'cssls',
'eslint',
'gopls',
'html',
'jsonls',
'lua_ls',
'ts_ls',
'yamlls',
})
vim.o.winborder = 'rounded'
require("config.lazy")
+3 -1
View File
@@ -6,7 +6,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
@@ -28,6 +28,8 @@ require("lazy").setup({
{ 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 = true },
})
+1
View File
@@ -1 +1,2 @@
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
+12 -11
View File
@@ -1,25 +1,28 @@
vim.opt.fileformat = "unix"
vim.opt.fileformats = "unix"
vim.opt.fixendofline = true
vim.opt.cmdheight = 0
vim.opt.guicursor = ""
vim.opt.mouse = ""
vim.opt.number = true
vim.opt.nu = 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
local home = os.getenv("HOME") or os.getenv("USERPROFILE")
vim.opt.undodir = home .. "/.vim/undodir"
vim.opt.undodir = os.getenv("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("@-@")
@@ -27,8 +30,6 @@ vim.opt.isfname:append("@-@")
vim.opt.updatetime = 50
vim.opt.colorcolumn = "80"
vim.g.c_syntax_for_h = 1
vim.cmd.colorscheme("moonfly")
vim.keymap.set('n', '<leader>d', vim.diagnostic.open_float, { noremap = true, silent = true })
vim.g.mapleader = " "
-13
View File
@@ -1,13 +0,0 @@
return {
'saghen/blink.cmp',
dependencies = { 'rafamadriz/friendly-snippets' },
version = '1.*',
opts = {
keymap = { preset = 'default' },
appearance = {
nerd_font_variant = 'mono'
},
signature = { enabled = true }
},
}
+36 -29
View File
@@ -1,37 +1,44 @@
return {
{"nvim-treesitter/nvim-treesitter", build = ":TSUpdate"},
{
"neovim/nvim-lspconfig",
dependencies = {
"saghen/blink.cmp"
},
config = function()
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('my.lsp', {}),
callback = function(args)
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
if not client then return end
if client:supports_method('textDocument/formatting') then
vim.api.nvim_create_autocmd('BufWritePre', {
group = vim.api.nvim_create_augroup('my.lsp', { clear = false }),
buffer = args.buf,
callback = function()
vim.lsp.buf.format({ bufnr = args.buf, id = client.id, timeout_ms = 1000 })
end,
})
end
end,
})
end
local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup{}
end,
},
{
"folke/lazydev.nvim",
ft = "lua",
opts = {
library = {
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
},
"VonHeikemen/lsp-zero.nvim",
dependencies = {
"neovim/nvim-lspconfig",
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-nvim-lsp"
},
},
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
{ "mfussenegger/nvim-jdtls" } -- jdtls bindings for neovim
config = function()
require("lsp-zero")
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,
})
end,
}
}
+16 -19
View File
@@ -1,4 +1,19 @@
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",
config = function()
@@ -13,10 +28,7 @@ return {
},
{
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" }
},
dependencies = {"nvim-lua/plenary.nvim"},
config = function()
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
@@ -25,20 +37,5 @@ return {
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
}
}
+11 -10
View File
@@ -1,4 +1,14 @@
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",
dependencies = { "nvim-tree/nvim-web-devicons" },
@@ -6,14 +16,5 @@ return {
config = function()
require("lualine").setup()
end,
},
{
"bluz71/vim-moonfly-colors",
lazy = false,
config = function()
vim.g.moonflyTransparent = true
end,
},
{ "EdenEast/nightfox.nvim", lazy = false },
{ "oxfist/night-owl.nvim", lazy = false },
}
}