Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3fd7015da8 |
@@ -3,4 +3,3 @@
|
|||||||
[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,3 +0,0 @@
|
|||||||
vim.opt_local.expandtab = true
|
|
||||||
vim.opt_local.shiftwidth = 4
|
|
||||||
vim.opt_local.tabstop = 4
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
vim.opt_local.expandtab = true
|
|
||||||
vim.opt_local.shiftwidth = 2
|
|
||||||
vim.opt_local.tabstop = 2
|
|
||||||
@@ -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)
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
vim.opt_local.expandtab = true
|
|
||||||
vim.opt_local.shiftwidth = 2
|
|
||||||
vim.opt_local.tabstop = 2
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
vim.opt_local.expandtab = true
|
|
||||||
vim.opt_local.shiftwidth = 4
|
|
||||||
vim.opt_local.tabstop = 4
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
vim.opt_local.expandtab = true
|
|
||||||
vim.opt_local.shiftwidth = 2
|
|
||||||
vim.opt_local.tabstop = 2
|
|
||||||
@@ -1,21 +1,3 @@
|
|||||||
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'
|
|
||||||
|
|||||||
+35
-33
@@ -1,33 +1,35 @@
|
|||||||
-- Bootstrap lazy.nvim
|
-- Bootstrap lazy.nvim
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
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()
|
||||||
os.exit(1)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||||
-- loading lazy.nvim so that mappings are correct.
|
-- loading lazy.nvim so that mappings are correct.
|
||||||
-- This is also a good place to setup other settings (vim.opt)
|
-- This is also a good place to setup other settings (vim.opt)
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.g.maplocalleader = "\\"
|
vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
-- Setup lazy.nvim
|
-- Setup lazy.nvim
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
-- import your plugins
|
-- import your plugins
|
||||||
{ 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.
|
||||||
-- automatically check for plugin updates
|
-- colorscheme that will be used when installing plugins.
|
||||||
checker = { enabled = true },
|
install = { colorscheme = { "habamax" } },
|
||||||
})
|
-- automatically check for plugin updates
|
||||||
|
checker = { enabled = true },
|
||||||
|
})
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
vim.g.mapleader = " "
|
||||||
|
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
||||||
|
|||||||
+35
-34
@@ -1,34 +1,35 @@
|
|||||||
vim.opt.fileformat = "unix"
|
vim.opt.cmdheight = 0
|
||||||
vim.opt.fileformats = "unix"
|
vim.opt.guicursor = ""
|
||||||
vim.opt.fixendofline = true
|
vim.opt.mouse = ""
|
||||||
vim.opt.guicursor = ""
|
|
||||||
vim.opt.mouse = ""
|
vim.opt.nu = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
vim.opt.number = true
|
|
||||||
vim.opt.relativenumber = true
|
vim.opt.tabstop = 2
|
||||||
|
vim.opt.softtabstop = 2
|
||||||
vim.opt.smartindent = true
|
vim.opt.shiftwidth = 2
|
||||||
|
vim.opt.expandtab = true
|
||||||
vim.opt.swapfile = false
|
|
||||||
vim.opt.backup = false
|
vim.opt.smartindent = true
|
||||||
local home = os.getenv("HOME") or os.getenv("USERPROFILE")
|
|
||||||
vim.opt.undodir = home .. "/.vim/undodir"
|
vim.opt.wrap = false
|
||||||
vim.opt.undofile = true
|
|
||||||
|
vim.opt.swapfile = false
|
||||||
vim.opt.hlsearch = false
|
vim.opt.backup = false
|
||||||
vim.opt.incsearch = true
|
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||||
|
vim.opt.undofile = true
|
||||||
vim.opt.termguicolors = true
|
|
||||||
|
vim.opt.hlsearch = false
|
||||||
vim.opt.scrolloff = 8
|
vim.opt.incsearch = true
|
||||||
vim.opt.signcolumn = "yes"
|
|
||||||
vim.opt.isfname:append("@-@")
|
vim.opt.termguicolors = true
|
||||||
|
vim.opt.scrolloff = 8
|
||||||
vim.opt.updatetime = 50
|
vim.opt.signcolumn = "yes"
|
||||||
|
vim.opt.isfname:append("@-@")
|
||||||
vim.opt.colorcolumn = "80"
|
|
||||||
vim.g.c_syntax_for_h = 1
|
vim.opt.updatetime = 50
|
||||||
|
|
||||||
vim.cmd.colorscheme("moonfly")
|
vim.opt.colorcolumn = "80"
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>d', vim.diagnostic.open_float, { noremap = true, silent = true })
|
vim.g.c_syntax_for_h = 1
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
|||||||
@@ -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 }
|
|
||||||
},
|
|
||||||
}
|
|
||||||
+44
-37
@@ -1,37 +1,44 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{"nvim-treesitter/nvim-treesitter", build = ":TSUpdate"},
|
||||||
"neovim/nvim-lspconfig",
|
{
|
||||||
dependencies = {
|
"neovim/nvim-lspconfig",
|
||||||
"saghen/blink.cmp"
|
config = function()
|
||||||
},
|
local lspconfig = require("lspconfig")
|
||||||
config = function()
|
lspconfig.lua_ls.setup{}
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
end,
|
||||||
group = vim.api.nvim_create_augroup('my.lsp', {}),
|
},
|
||||||
callback = function(args)
|
{
|
||||||
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
if not client then return end
|
dependencies = {
|
||||||
if client:supports_method('textDocument/formatting') then
|
"neovim/nvim-lspconfig",
|
||||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
"hrsh7th/nvim-cmp",
|
||||||
group = vim.api.nvim_create_augroup('my.lsp', { clear = false }),
|
"hrsh7th/cmp-nvim-lsp"
|
||||||
buffer = args.buf,
|
},
|
||||||
callback = function()
|
config = function()
|
||||||
vim.lsp.buf.format({ bufnr = args.buf, id = client.id, timeout_ms = 1000 })
|
require("lsp-zero")
|
||||||
end,
|
vim.opt.signcolumn = 'yes'
|
||||||
})
|
local lspconfig_defaults = require('lspconfig').util.default_config
|
||||||
end
|
lspconfig_defaults.capabilities = vim.tbl_deep_extend(
|
||||||
end,
|
'force',
|
||||||
})
|
lspconfig_defaults.capabilities,
|
||||||
end
|
require('cmp_nvim_lsp').default_capabilities()
|
||||||
},
|
)
|
||||||
{
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
"folke/lazydev.nvim",
|
desc = 'LSP actions',
|
||||||
ft = "lua",
|
callback = function(event)
|
||||||
opts = {
|
local opts = {buffer = event.buf}
|
||||||
library = {
|
vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
|
||||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
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)
|
||||||
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
|
vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
|
||||||
{ "mfussenegger/nvim-jdtls" } -- jdtls bindings for neovim
|
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,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+41
-44
@@ -1,44 +1,41 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"mbbill/undotree",
|
"theprimeagen/harpoon",
|
||||||
config = function()
|
config = function()
|
||||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
local mark = require("harpoon.mark")
|
||||||
end,
|
local ui = require("harpoon.ui")
|
||||||
},
|
|
||||||
{
|
vim.keymap.set("n", "<leader>a", mark.add_file)
|
||||||
"tpope/vim-fugitive",
|
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
||||||
config = function()
|
|
||||||
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
|
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
|
||||||
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)
|
||||||
"nvim-telescope/telescope.nvim",
|
end,
|
||||||
dependencies = {
|
},
|
||||||
"nvim-lua/plenary.nvim",
|
{
|
||||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" }
|
"mbbill/undotree",
|
||||||
},
|
config = function()
|
||||||
config = function()
|
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||||
local builtin = require('telescope.builtin')
|
end,
|
||||||
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()
|
"tpope/vim-fugitive",
|
||||||
builtin.grep_string({ search = vim.fn.input("Grep > ") });
|
config = function()
|
||||||
end)
|
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"theprimeagen/harpoon",
|
"nvim-telescope/telescope.nvim",
|
||||||
config = function()
|
dependencies = {"nvim-lua/plenary.nvim"},
|
||||||
local mark = require("harpoon.mark")
|
config = function()
|
||||||
local ui = require("harpoon.ui")
|
local builtin = require('telescope.builtin')
|
||||||
|
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
|
||||||
vim.keymap.set("n", "<leader>a", mark.add_file)
|
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
|
||||||
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
vim.keymap.set('n', '<leader>ps', function()
|
||||||
|
builtin.grep_string({ search = vim.fn.input("Grep > ") });
|
||||||
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
|
end)
|
||||||
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
+20
-19
@@ -1,19 +1,20 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"oxfist/night-owl.nvim",
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
lazy = false, -- make sure we load this during startup if it is your main colorscheme
|
||||||
lazy = false,
|
priority = 1000, -- make sure to load this before all the other start plugins
|
||||||
config = function()
|
config = function()
|
||||||
require("lualine").setup()
|
-- load the colorscheme here
|
||||||
end,
|
require("night-owl").setup()
|
||||||
},
|
vim.cmd.colorscheme("night-owl")
|
||||||
{
|
end,
|
||||||
"bluz71/vim-moonfly-colors",
|
},
|
||||||
lazy = false,
|
{
|
||||||
config = function()
|
"nvim-lualine/lualine.nvim",
|
||||||
vim.g.moonflyTransparent = true
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
end,
|
lazy = false,
|
||||||
},
|
config = function()
|
||||||
{ "EdenEast/nightfox.nvim", lazy = false },
|
require("lualine").setup()
|
||||||
{ "oxfist/night-owl.nvim", lazy = false },
|
end,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user