added auto formatting and .editorconfig

This commit is contained in:
2025-05-04 18:19:13 +02:00
parent 9e4735ee47
commit 94590db5c9
10 changed files with 88 additions and 75 deletions
+1 -2
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()
@@ -31,4 +31,3 @@ require("lazy").setup({
-- automatically check for plugin updates
checker = { enabled = true },
})
-1
View File
@@ -1,2 +1 @@
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
-1
View File
@@ -33,4 +33,3 @@ 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 })
+26 -9
View File
@@ -1,11 +1,28 @@
return {
{
"neovim/nvim-lspconfig",
dependencies = {
"saghen/blink.cmp"
}
},
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
{ "mfussenegger/nvim-jdtls" } -- jdtls bindings for neovim
{
"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
},
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
{ "mfussenegger/nvim-jdtls" } -- jdtls bindings for neovim
}
+37 -38
View File
@@ -1,42 +1,41 @@
return {
{
"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")
{
"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
}
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
}
}
+17 -18
View File
@@ -1,20 +1,19 @@
return {
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
lazy = false,
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 },
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
lazy = false,
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 },
}