Squashed commit of the following:
commit7322bc0f73Author: anth64 <anth64@protonmail.com> Date: Tue Apr 15 22:21:09 2025 +0200 use lspconfig commit5577628a22Author: anth64 <anth64@protonmail.com> Date: Tue Apr 15 20:08:14 2025 +0200 reorderd lazy and config commit7f1a3b82daAuthor: anth64 <anth64@protonmail.com> Date: Tue Apr 15 19:29:43 2025 +0200 add colorschemes, default to moonfly commit466c8cf410Author: anth64 <anth64@protonmail.com> Date: Tue Apr 15 18:51:56 2025 +0200 make it work on windows as well commita9d9c2199dAuthor: anth64 <anth64@protonmail.com> Date: Fri Apr 11 07:26:54 2025 +0200 added jdtls and newline to end of files commit4db9e65e6fAuthor: anth64 <anth64@protonmail.com> Date: Thu Apr 10 22:33:16 2025 +0200 remove redundant remap of mapleader commitbb0ad9af1bAuthor: anth64 <anth64@protonmail.com> Date: Thu Apr 10 22:28:45 2025 +0200 readd telescope and harpoon commit1a56e26e6bAuthor: anth64 <anth64@protonmail.com> Date: Thu Apr 10 22:20:12 2025 +0200 redid mapping, set and util, also readded nvim-cmp and cmp-nvim-lsp commit690e575c03Author: anth64 <anth64@protonmail.com> Date: Wed Apr 9 23:23:51 2025 +0200 make sure that colorscheme is not touched commit0ab0b593f2Author: anth64 <anth64@protonmail.com> Date: Wed Apr 9 22:56:58 2025 +0200 add lazy.nvim and lualine plugin commita8dd286e39Author: anth64 <anth64@protonmail.com> Date: Wed Apr 9 07:59:00 2025 +0200 initial configuration
This commit is contained in:
+6
-74
@@ -1,76 +1,8 @@
|
||||
return {
|
||||
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
|
||||
{ "mfussenegger/nvim-jdtls" },
|
||||
{
|
||||
"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 = {
|
||||
"neovim/nvim-lspconfig",
|
||||
"hrsh7th/nvim-cmp",
|
||||
"hrsh7th/cmp-nvim-lsp"
|
||||
},
|
||||
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', {
|
||||
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,
|
||||
})
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.lua_ls.setup{}
|
||||
|
||||
local cmp = require('cmp')
|
||||
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.snippet.expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({}),
|
||||
})
|
||||
end,
|
||||
}
|
||||
{ "neovim/nvim-lspconfig" },
|
||||
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
|
||||
{ "hrsh7th/nvim-cmp" },
|
||||
{ "hrsh7th/cmp-nvim-lsp" },
|
||||
{ "mfussenegger/nvim-jdtls" } -- jdtls bindings for neovim
|
||||
}
|
||||
|
||||
|
||||
+38
-37
@@ -1,41 +1,42 @@
|
||||
return {
|
||||
{
|
||||
"theprimeagen/harpoon",
|
||||
config = function()
|
||||
local mark = require("harpoon.mark")
|
||||
local ui = require("harpoon.ui")
|
||||
{
|
||||
"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", "<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()
|
||||
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,
|
||||
}
|
||||
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
-16
@@ -1,20 +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" },
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("lualine").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"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 },
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user