added auto formatting and .editorconfig
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
[*.lua]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@@ -9,4 +9,3 @@ local config = {
|
||||
}
|
||||
|
||||
require('jdtls').start_or_attach(config)
|
||||
|
||||
|
||||
@@ -5,4 +5,3 @@ require("config.remap")
|
||||
vim.cmd("set completeopt+=noselect")
|
||||
vim.lsp.enable({ 'basedpyright', 'lua_ls', 'yamlls', 'gopls', 'htmx', 'jsonls' })
|
||||
vim.o.winborder = 'rounded'
|
||||
|
||||
|
||||
@@ -31,4 +31,3 @@ require("lazy").setup({
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
||||
|
||||
|
||||
@@ -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 })
|
||||
|
||||
|
||||
+19
-2
@@ -3,9 +3,26 @@ return {
|
||||
"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
|
||||
}
|
||||
|
||||
|
||||
@@ -39,4 +39,3 @@ return {
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,4 +17,3 @@ return {
|
||||
{ "EdenEast/nightfox.nvim", lazy = false },
|
||||
{ "oxfist/night-owl.nvim", lazy = false },
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user