feat: state from paimutan
This commit is contained in:
parent
f2374a3d4c
commit
503048e94d
124
init.lua
124
init.lua
|
@ -91,7 +91,7 @@ vim.g.mapleader = ' '
|
|||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- 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 ]]
|
||||
-- See `:help vim.opt`
|
||||
|
@ -142,6 +142,8 @@ vim.opt.timeoutlen = 300
|
|||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
|
||||
vim.opt.wrap = true
|
||||
|
||||
-- Sets how neovim will display certain whitespace characters in the editor.
|
||||
-- See `:help 'list'`
|
||||
-- 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',
|
||||
|
@ -634,9 +652,11 @@ require('lazy').setup({
|
|||
-- - 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/
|
||||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
-- pyright = {},
|
||||
clangd = {},
|
||||
gopls = {},
|
||||
pyright = {},
|
||||
kotlin_language_server = {},
|
||||
phpactor = {},
|
||||
-- rust_analyzer = {},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
--
|
||||
|
@ -699,48 +719,49 @@ require('lazy').setup({
|
|||
end,
|
||||
},
|
||||
|
||||
{ -- Autoformat
|
||||
'stevearc/conform.nvim',
|
||||
event = { 'BufWritePre' },
|
||||
cmd = { 'ConformInfo' },
|
||||
keys = {
|
||||
{
|
||||
'<leader>f',
|
||||
function()
|
||||
require('conform').format { async = true, lsp_format = 'fallback' }
|
||||
end,
|
||||
mode = '',
|
||||
desc = '[F]ormat buffer',
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
notify_on_error = false,
|
||||
format_on_save = function(bufnr)
|
||||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||
-- have a well standardized coding style. You can add additional
|
||||
-- languages here or re-enable it for the disabled ones.
|
||||
local disable_filetypes = { c = true, cpp = true }
|
||||
local lsp_format_opt
|
||||
if disable_filetypes[vim.bo[bufnr].filetype] then
|
||||
lsp_format_opt = 'never'
|
||||
else
|
||||
lsp_format_opt = 'fallback'
|
||||
end
|
||||
return {
|
||||
timeout_ms = 500,
|
||||
lsp_format = lsp_format_opt,
|
||||
}
|
||||
end,
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
-- 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 },
|
||||
},
|
||||
},
|
||||
},
|
||||
-- { -- Autoformat
|
||||
-- 'stevearc/confoorm.nvim',
|
||||
-- event = { 'BufWritePre' },
|
||||
-- cmd = { 'ConformInfo' },
|
||||
-- keys = {
|
||||
-- {
|
||||
-- '<leader>f',
|
||||
-- function()
|
||||
-- require('conform').format { async = true, lsp_format = 'fallback' }
|
||||
-- end,
|
||||
-- mode = '',
|
||||
-- desc = '[F]ormat buffer',
|
||||
-- },
|
||||
-- },
|
||||
-- opts = {
|
||||
-- notify_on_error = false,
|
||||
-- format_on_save = function(bufnr)
|
||||
-- -- Disable "format_on_save lsp_fallback" for languages that don't
|
||||
-- -- have a well standardized coding style. You can add additional
|
||||
-- -- languages here or re-enable it for the disabled ones.
|
||||
-- local disable_filetypes = { c = true, cpp = true }
|
||||
-- local lsp_format_opt
|
||||
-- if disable_filetypes[vim.bo[bufnr].filetype] then
|
||||
-- lsp_format_opt = 'never'
|
||||
-- else
|
||||
-- lsp_format_opt = 'fallback'
|
||||
-- end
|
||||
-- return {
|
||||
-- timeout_ms = 500,
|
||||
-- lsp_format = lsp_format_opt,
|
||||
-- }
|
||||
-- end,
|
||||
-- formatters_by_ft = {
|
||||
-- lua = { 'stylua' },
|
||||
-- kotlin = { 'ktlint' },
|
||||
-- -- 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 },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
|
||||
{ -- Autocompletion
|
||||
'hrsh7th/nvim-cmp',
|
||||
|
@ -922,7 +943,7 @@ require('lazy').setup({
|
|||
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||
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
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
|
@ -941,6 +962,9 @@ require('lazy').setup({
|
|||
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
|
||||
-- - 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
|
||||
-- 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`
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
||||
|
|
Loading…
Reference in New Issue