Compare commits
27 Commits
update/0.11
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ca49391504 | |||
| caa148b6b0 | |||
| 1a0b08d37d | |||
| 6b5bb2ff3a | |||
| 0001d8a14e | |||
| 2a789eda7a | |||
| 764dee5a9b | |||
| 6e9d990167 | |||
| 3de62d002d | |||
| 2d4e745910 | |||
| ed22584915 | |||
| 764f2500f7 | |||
| 2d1dd2bfec | |||
| 1387429c47 | |||
| 9820d9a155 | |||
| 464361b990 | |||
| 94590db5c9 | |||
| 9e4735ee47 | |||
| 5e6716e263 | |||
| b07f1aaf35 | |||
| 7a3800f2a0 | |||
| 655df38a9f | |||
| d3f12ddb2d | |||
| 98c1aba113 | |||
| c51e3b30e7 | |||
| 6c9250d1da | |||
| b7e3d43782 |
@@ -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.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
vim.opt_local.expandtab = true
|
||||||
|
vim.opt_local.shiftwidth = 4
|
||||||
|
vim.opt_local.tabstop = 4
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
vim.opt_local.expandtab = true
|
||||||
|
vim.opt_local.shiftwidth = 2
|
||||||
|
vim.opt_local.tabstop = 2
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
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)
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
vim.opt_local.expandtab = true
|
||||||
|
vim.opt_local.shiftwidth = 2
|
||||||
|
vim.opt_local.tabstop = 2
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
vim.opt_local.expandtab = true
|
||||||
|
vim.opt_local.shiftwidth = 4
|
||||||
|
vim.opt_local.tabstop = 4
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
vim.opt_local.expandtab = true
|
||||||
|
vim.opt_local.shiftwidth = 2
|
||||||
|
vim.opt_local.tabstop = 2
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
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)
|
|
||||||
@@ -1,3 +1,21 @@
|
|||||||
|
require("config.lazy")
|
||||||
require("config.set")
|
require("config.set")
|
||||||
require("config.remap")
|
require("config.remap")
|
||||||
require("config.lazy")
|
|
||||||
|
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'
|
||||||
|
|||||||
+1
-3
@@ -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()
|
||||||
@@ -28,8 +28,6 @@ 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,2 +1 @@
|
|||||||
vim.g.mapleader = " "
|
|
||||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
||||||
|
|||||||
+10
-22
@@ -1,38 +1,25 @@
|
|||||||
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
vim.opt.fileformat = "unix"
|
||||||
group = vim.api.nvim_create_augroup("float_diagnostic_cursor", { clear = true }),
|
vim.opt.fileformats = "unix"
|
||||||
callback = function ()
|
vim.opt.fixendofline = true
|
||||||
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.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
|
||||||
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.undofile = true
|
||||||
|
|
||||||
vim.opt.hlsearch = false
|
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("@-@")
|
||||||
@@ -40,7 +27,8 @@ 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")
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>d', vim.diagnostic.open_float, { noremap = true, silent = true })
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
'saghen/blink.cmp',
|
||||||
|
dependencies = { 'rafamadriz/friendly-snippets' },
|
||||||
|
version = '1.*',
|
||||||
|
|
||||||
|
opts = {
|
||||||
|
keymap = { preset = 'default' },
|
||||||
|
appearance = {
|
||||||
|
nerd_font_variant = 'mono'
|
||||||
|
},
|
||||||
|
signature = { enabled = true }
|
||||||
|
},
|
||||||
|
}
|
||||||
+27
-66
@@ -1,76 +1,37 @@
|
|||||||
return {
|
return {
|
||||||
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
|
|
||||||
{ "mfussenegger/nvim-jdtls" },
|
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
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 = {
|
dependencies = {
|
||||||
"neovim/nvim-lspconfig",
|
"saghen/blink.cmp"
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
"hrsh7th/cmp-nvim-lsp"
|
|
||||||
},
|
},
|
||||||
config = function()
|
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', {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
desc = 'LSP actions',
|
group = vim.api.nvim_create_augroup('my.lsp', {}),
|
||||||
callback = function(event)
|
callback = function(args)
|
||||||
local opts = { buffer = event.buf }
|
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
|
||||||
|
if not client then return end
|
||||||
vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
|
if client:supports_method('textDocument/formatting') then
|
||||||
vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
|
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||||
vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
|
group = vim.api.nvim_create_augroup('my.lsp', { clear = false }),
|
||||||
vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
|
buffer = args.buf,
|
||||||
vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
|
callback = function()
|
||||||
vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
|
vim.lsp.buf.format({ bufnr = args.buf, id = client.id, timeout_ms = 1000 })
|
||||||
vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
|
end,
|
||||||
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)
|
end
|
||||||
vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts)
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
local lspconfig = require('lspconfig')
|
},
|
||||||
lspconfig.lua_ls.setup{}
|
{
|
||||||
|
"folke/lazydev.nvim",
|
||||||
local cmp = require('cmp')
|
ft = "lua",
|
||||||
|
opts = {
|
||||||
cmp.setup({
|
library = {
|
||||||
sources = {
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||||
{ name = 'nvim_lsp' },
|
},
|
||||||
},
|
},
|
||||||
snippet = {
|
},
|
||||||
expand = function(args)
|
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
|
||||||
vim.snippet.expand(args.body)
|
{ "mfussenegger/nvim-jdtls" } -- jdtls bindings for neovim
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert({}),
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-16
@@ -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()
|
||||||
@@ -28,7 +13,10 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
dependencies = {"nvim-lua/plenary.nvim"},
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" }
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
|
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
|
||||||
@@ -37,5 +25,20 @@ 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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-11
@@ -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,14 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
require("lualine").setup()
|
require("lualine").setup()
|
||||||
end,
|
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 },
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user