feat: state from paimutan

This commit is contained in:
Petr Sykora 2025-02-10 18:29:53 +01:00
parent f2374a3d4c
commit 503048e94d
1 changed files with 77 additions and 47 deletions

124
init.lua
View File

@ -91,7 +91,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '
-- Set to true if you have a Nerd Font installed and selected in the terminal -- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = false vim.g.have_nerd_font = true
-- [[ Setting options ]] -- [[ Setting options ]]
-- See `:help vim.opt` -- See `:help vim.opt`
@ -142,6 +142,8 @@ vim.opt.timeoutlen = 300
vim.opt.splitright = true vim.opt.splitright = true
vim.opt.splitbelow = true vim.opt.splitbelow = true
vim.opt.wrap = true
-- Sets how neovim will display certain whitespace characters in the editor. -- Sets how neovim will display certain whitespace characters in the editor.
-- See `:help 'list'` -- See `:help 'list'`
-- and `:help 'listchars'` -- and `:help 'listchars'`
@ -258,6 +260,22 @@ require('lazy').setup({
}, },
}, },
}, },
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"sindrets/diffview.nvim", -- optional - Diff integration
-- Only one of these is needed.
"nvim-telescope/telescope.nvim", -- optional
"ibhagwan/fzf-lua", -- optional
"echasnovski/mini.pick", -- optional
},
integrations = {
diffview = true
},
config = true
},
{ {
'NeogitOrg/neogit', 'NeogitOrg/neogit',
@ -634,9 +652,11 @@ require('lazy').setup({
-- - settings (table): Override the default settings passed when initializing the server. -- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = { local servers = {
-- clangd = {}, clangd = {},
-- gopls = {}, gopls = {},
-- pyright = {}, pyright = {},
kotlin_language_server = {},
phpactor = {},
-- rust_analyzer = {}, -- rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
-- --
@ -699,48 +719,49 @@ require('lazy').setup({
end, end,
}, },
{ -- Autoformat -- { -- Autoformat
'stevearc/conform.nvim', -- 'stevearc/confoorm.nvim',
event = { 'BufWritePre' }, -- event = { 'BufWritePre' },
cmd = { 'ConformInfo' }, -- cmd = { 'ConformInfo' },
keys = { -- keys = {
{ -- {
'<leader>f', -- '<leader>f',
function() -- function()
require('conform').format { async = true, lsp_format = 'fallback' } -- require('conform').format { async = true, lsp_format = 'fallback' }
end, -- end,
mode = '', -- mode = '',
desc = '[F]ormat buffer', -- desc = '[F]ormat buffer',
}, -- },
}, -- },
opts = { -- opts = {
notify_on_error = false, -- notify_on_error = false,
format_on_save = function(bufnr) -- format_on_save = function(bufnr)
-- Disable "format_on_save lsp_fallback" for languages that don't -- -- Disable "format_on_save lsp_fallback" for languages that don't
-- have a well standardized coding style. You can add additional -- -- have a well standardized coding style. You can add additional
-- languages here or re-enable it for the disabled ones. -- -- languages here or re-enable it for the disabled ones.
local disable_filetypes = { c = true, cpp = true } -- local disable_filetypes = { c = true, cpp = true }
local lsp_format_opt -- local lsp_format_opt
if disable_filetypes[vim.bo[bufnr].filetype] then -- if disable_filetypes[vim.bo[bufnr].filetype] then
lsp_format_opt = 'never' -- lsp_format_opt = 'never'
else -- else
lsp_format_opt = 'fallback' -- lsp_format_opt = 'fallback'
end -- end
return { -- return {
timeout_ms = 500, -- timeout_ms = 500,
lsp_format = lsp_format_opt, -- lsp_format = lsp_format_opt,
} -- }
end, -- end,
formatters_by_ft = { -- formatters_by_ft = {
lua = { 'stylua' }, -- lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially -- kotlin = { 'ktlint' },
-- python = { "isort", "black" }, -- -- Conform can also run multiple formatters sequentially
-- -- -- python = { "isort", "black" },
-- You can use 'stop_after_first' to run the first available formatter from the list -- --
-- javascript = { "prettierd", "prettier", stop_after_first = true }, -- -- You can use 'stop_after_first' to run the first available formatter from the list
}, -- -- javascript = { "prettierd", "prettier", stop_after_first = true },
}, -- },
}, -- },
-- },
{ -- Autocompletion { -- Autocompletion
'hrsh7th/nvim-cmp', 'hrsh7th/nvim-cmp',
@ -922,7 +943,7 @@ require('lazy').setup({
main = 'nvim-treesitter.configs', -- Sets main module to use for opts main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter` -- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = { opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'yaml', 'kotlin' },
-- Autoinstall languages that are not installed -- Autoinstall languages that are not installed
auto_install = true, auto_install = true,
highlight = { highlight = {
@ -941,6 +962,9 @@ require('lazy').setup({
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
}, },
{
'wellle/context.vim'
},
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
-- init.lua. If you want these files, they are in the repository, so you can just download them and -- init.lua. If you want these files, they are in the repository, so you can just download them and
@ -990,5 +1014,11 @@ require('lazy').setup({
}, },
}) })
require('lspconfig').clangd.setup {
cmd = { 'clangd', '--clang-tidy' },
}
require('lspconfig').clangd.setup {
cmd = { '/home/sykop5am/.espressif/tools/esp-clang/16.0.1-fe4f10a809/esp-clang/bin/clangd', '--clang-tidy' },
}
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et