11 Commits

15 changed files with 79 additions and 149 deletions
-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
+6
View File
@@ -0,0 +1,6 @@
local config = {
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)
+12 -15
View File
@@ -2,20 +2,17 @@ require("config.lazy")
require("config.set") require("config.set")
require("config.remap") require("config.remap")
vim.cmd("set completeopt+=noselect") vim.api.nvim_create_autocmd('LspAttach', {
callback = function(ev)
vim.lsp.enable({ local client = vim.lsp.get_client_by_id(ev.data.client_id)
'basedpyright', if client:supports_method('textDocument/completion') then
'clangd', vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
'csharp_ls', end
'cssls', end,
'eslint',
'gopls',
'html',
'jsonls',
'lua_ls',
'ts_ls',
'yamlls',
}) })
vim.o.winborder = 'rounded' vim.lsp.enable({'basedpyright', 'lua_ls', 'yamlls'})
vim.cmd("set completeopt+=noselect")
vim.o.winborder='rounded'
+2 -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 if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({ vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" }, { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" }, { out, "WarningMsg" },
{ "\nPress any key to exit..." }, { "\nPress any key to exit..." },
}, true, {}) }, true, {})
vim.fn.getchar() vim.fn.getchar()
@@ -31,3 +31,4 @@ require("lazy").setup({
-- automatically check for plugin updates -- automatically check for plugin updates
checker = { enabled = true }, checker = { enabled = true },
}) })
+1
View File
@@ -1 +1,2 @@
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex) vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
+2 -2
View File
@@ -1,6 +1,7 @@
vim.opt.shell = "zsh"
vim.opt.fileformat = "unix" vim.opt.fileformat = "unix"
vim.opt.fileformats = "unix" vim.opt.fileformats = "unix"
vim.opt.fixendofline = true vim.opt.cmdheight = 0
vim.opt.guicursor = "" vim.opt.guicursor = ""
vim.opt.mouse = "" vim.opt.mouse = ""
@@ -31,4 +32,3 @@ vim.g.c_syntax_for_h = 1
vim.cmd.colorscheme("moonfly") vim.cmd.colorscheme("moonfly")
vim.keymap.set('n', '<leader>d', vim.diagnostic.open_float, { noremap = true, silent = true })
-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 }
},
}
+6 -35
View File
@@ -1,37 +1,8 @@
return { return {
{ { "neovim/nvim-lspconfig" },
"neovim/nvim-lspconfig", { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
dependencies = { { "hrsh7th/nvim-cmp" },
"saghen/blink.cmp" { "hrsh7th/cmp-nvim-lsp" },
}, { "mfussenegger/nvim-jdtls" } -- jdtls bindings for neovim
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
},
{
"folke/lazydev.nvim",
ft = "lua",
opts = {
library = {
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
},
},
},
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
{ "mfussenegger/nvim-jdtls" } -- jdtls bindings for neovim
} }
+38 -40
View File
@@ -1,44 +1,42 @@
return { return {
{ {
"mbbill/undotree", "mbbill/undotree",
config = function() config = function()
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle) vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
end, end,
}, },
{ {
"tpope/vim-fugitive", "tpope/vim-fugitive",
config = function() config = function()
vim.keymap.set("n", "<leader>gs", vim.cmd.Git) vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
end, end,
}, },
{ {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
dependencies = { dependencies = {"nvim-lua/plenary.nvim"},
"nvim-lua/plenary.nvim", config = function()
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" } local builtin = require('telescope.builtin')
}, vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
config = function() vim.keymap.set('n', '<C-p>', builtin.git_files, {})
local builtin = require('telescope.builtin') vim.keymap.set('n', '<leader>ps', function()
vim.keymap.set('n', '<leader>pf', builtin.find_files, {}) builtin.grep_string({ search = vim.fn.input("Grep > ") });
vim.keymap.set('n', '<C-p>', builtin.git_files, {}) end)
vim.keymap.set('n', '<leader>ps', function() end,
builtin.grep_string({ search = vim.fn.input("Grep > ") }); },
end) {
end, "theprimeagen/harpoon",
}, config = function()
{ local mark = require("harpoon.mark")
"theprimeagen/harpoon", local ui = require("harpoon.ui")
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", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu) 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-h>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) 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-n>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end) vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)
end end
} }
} }
+12 -17
View File
@@ -1,19 +1,14 @@
return { return {
{ {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" }, dependencies = { "nvim-tree/nvim-web-devicons" },
lazy = false, lazy = false,
config = function() config = function()
require("lualine").setup() require("lualine").setup()
end, end,
}, },
{ { "bluz71/vim-moonfly-colors", lazy = false },
"bluz71/vim-moonfly-colors", { "EdenEast/nightfox.nvim", lazy = false },
lazy = false, { "oxfist/night-owl.nvim", lazy = false },
config = function()
vim.g.moonflyTransparent = true
end,
},
{ "EdenEast/nightfox.nvim", lazy = false },
{ "oxfist/night-owl.nvim", lazy = false },
} }