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
+3
View File
@@ -0,0 +1,3 @@
[*.lua]
indent_style = space
indent_size = 2
View File
-1
View File
@@ -9,4 +9,3 @@ local config = {
} }
require('jdtls').start_or_attach(config) require('jdtls').start_or_attach(config)
-1
View File
@@ -5,4 +5,3 @@ require("config.remap")
vim.cmd("set completeopt+=noselect") vim.cmd("set completeopt+=noselect")
vim.lsp.enable({ 'basedpyright', 'lua_ls', 'yamlls', 'gopls', 'htmx', 'jsonls' }) vim.lsp.enable({ 'basedpyright', 'lua_ls', 'yamlls', 'gopls', 'htmx', 'jsonls' })
vim.o.winborder = 'rounded' vim.o.winborder = 'rounded'
-1
View File
@@ -31,4 +31,3 @@ require("lazy").setup({
-- automatically check for plugin updates -- automatically check for plugin updates
checker = { enabled = true }, checker = { enabled = true },
}) })
-1
View File
@@ -1,2 +1 @@
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex) 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.cmd.colorscheme("moonfly")
vim.keymap.set('n', '<leader>d', vim.diagnostic.open_float, { noremap = true, silent = true }) vim.keymap.set('n', '<leader>d', vim.diagnostic.open_float, { noremap = true, silent = true })
+19 -2
View File
@@ -3,9 +3,26 @@ return {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
dependencies = { dependencies = {
"saghen/blink.cmp" "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" }, { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
{ "mfussenegger/nvim-jdtls" } -- jdtls bindings for neovim { "mfussenegger/nvim-jdtls" } -- jdtls bindings for neovim
} }
-1
View File
@@ -39,4 +39,3 @@ return {
end end
} }
} }
-1
View File
@@ -17,4 +17,3 @@ return {
{ "EdenEast/nightfox.nvim", lazy = false }, { "EdenEast/nightfox.nvim", lazy = false },
{ "oxfist/night-owl.nvim", lazy = false }, { "oxfist/night-owl.nvim", lazy = false },
} }