Setup upgrade and python setup I guess
This commit is contained in:
parent
e5a8434a55
commit
9d7fd2277a
17 changed files with 175 additions and 57 deletions
dotfiles/neovim/lua/my/plugins
|
@ -199,6 +199,57 @@ return {
|
|||
config = function()
|
||||
require("presence"):setup()
|
||||
end,
|
||||
lazy = false,
|
||||
}
|
||||
event = "VeryLazy",
|
||||
},
|
||||
|
||||
-- Live command preview for stuff like :norm
|
||||
{
|
||||
"smjonas/live-command.nvim",
|
||||
opts = {
|
||||
commands = {
|
||||
Norm = { cmd = "norm" },
|
||||
},
|
||||
},
|
||||
event = "VeryLazy",
|
||||
cond = false,
|
||||
},
|
||||
|
||||
{
|
||||
"goerz/jupytext.vim",
|
||||
lazy = false, -- Otherwise I can't get this to work with nvim *.ipynb
|
||||
cond = env.vscode.not_active(),
|
||||
config = function()
|
||||
-- Use %% as cell delimiter
|
||||
vim.g.jupytext_fmt = "py:percent"
|
||||
-- vim.opt.foldmarker = "%%,%%"
|
||||
end,
|
||||
init = function()
|
||||
vim.cmd([[
|
||||
function GetJupytextFold(linenum)
|
||||
if getline(a:linenum) =~ "^#\\s%%"
|
||||
" start fold
|
||||
return ">1"
|
||||
elseif getline(a:linenum + 1) =~ "^#\\s%%"
|
||||
return "<1"
|
||||
else
|
||||
return "-1"
|
||||
endif
|
||||
endfunction
|
||||
]])
|
||||
|
||||
-- Set the correct foldexpr
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
pattern = { "*.ipynb" },
|
||||
group = vim.api.nvim_create_augroup("JupytextFoldExpr", {}),
|
||||
callback = function()
|
||||
vim.cmd([[
|
||||
setlocal foldexpr=GetJupytextFold(v:lnum)
|
||||
setlocal foldmethod=expr
|
||||
" Deletes and pastes all text. Used to refresh folds.
|
||||
:norm ggVGdpggdd
|
||||
]])
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -127,11 +127,19 @@ local servers = {
|
|||
},
|
||||
-- }}}
|
||||
-- {{{ Lua
|
||||
sumneko_lua = {
|
||||
lua_ls = {
|
||||
cmd = {
|
||||
"lua-language-server",
|
||||
"--logpath=/home/adrielus/.local/share/lua-language-server/log",
|
||||
},
|
||||
settings = {
|
||||
Lua = {
|
||||
-- Do not send telemetry data containing a randomized but unique identifier
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ Latex
|
||||
|
@ -161,6 +169,8 @@ local servers = {
|
|||
jsonls = {},
|
||||
rust_analyzer = {},
|
||||
dhall_lsp_server = {},
|
||||
-- pylsp = {},
|
||||
-- pyright = {},
|
||||
}
|
||||
-- }}}
|
||||
-- {{{ Capabilities
|
||||
|
|
|
@ -6,7 +6,7 @@ local M = {
|
|||
-- dependencies = { "plenary.nvim" },
|
||||
|
||||
cmd = "Neogit",
|
||||
enabled = env.firenvim.not_active() and env.vscode.not_active(),
|
||||
cond = env.firenvim.not_active() and env.vscode.not_active(),
|
||||
init = function()
|
||||
vim.keymap.set("n", "<C-g>", "<cmd>Neogit<cr>", { desc = "Open neo[g]it" })
|
||||
end,
|
||||
|
|
|
@ -12,10 +12,25 @@ function M.config()
|
|||
local null_ls = require("null-ls")
|
||||
|
||||
local sources = {
|
||||
null_ls.builtins.formatting.prettier.with({ extra_filetypes = {} }), -- format ts files
|
||||
-- null_ls.builtins.formatting.prettierd.with({ extra_filetypes = {} }), -- format ts files
|
||||
null_ls.builtins.formatting.stylua.with({}), -- format lua code
|
||||
-- null_ls.builtins.formatting.lua_format.with({}), -- format lua code
|
||||
-- {{{ Typescript formatting
|
||||
-- null_ls.builtins.formatting.prettierd, -- format ts files
|
||||
null_ls.builtins.formatting.prettier, -- format ts files
|
||||
-- }}}
|
||||
-- {{{ Lua formatting
|
||||
-- null_ls.builtins.formatting, -- format lua code
|
||||
null_ls.builtins.formatting.stylua, -- format lua code
|
||||
-- }}}
|
||||
-- {{{ Python
|
||||
-- Formatting:
|
||||
-- null_ls.builtins.formatting.black,
|
||||
-- null_ls.builtins.formatting.isort,
|
||||
null_ls.builtins.formatting.yapf.with({
|
||||
extra_args = { [[--style="{ indent_width: 2 }"]] },
|
||||
}),
|
||||
-- Diagnostics
|
||||
null_ls.builtins.diagnostics.ruff, -- Linting
|
||||
-- null_ls.builtins.diagnostics.mypy, -- Type checking
|
||||
-- }}}
|
||||
}
|
||||
|
||||
null_ls.setup({
|
||||
|
|
|
@ -33,6 +33,7 @@ local M = {
|
|||
"vim",
|
||||
"yaml",
|
||||
"nix",
|
||||
"lua"
|
||||
},
|
||||
sync_install = false,
|
||||
--}}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue