Merge pull request 'removed obisidian and added conform and todo comments' (#2) from remove-obsidian-and-add-new-plugins into main
Reviewed-on: #2
This commit is contained in:
commit
6f0048ce70
3 changed files with 36 additions and 27 deletions
24
lua/plugins/conform.lua
Normal file
24
lua/plugins/conform.lua
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
return {
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
config = function()
|
||||||
|
require("conform").setup({
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = { "stylua" },
|
||||||
|
python = function(bufnr)
|
||||||
|
if require("conform").get_formatter_info("ruff_format", bufnr).available then
|
||||||
|
return { "ruff_fix", "ruff_format" }
|
||||||
|
else
|
||||||
|
return { "isort", "black", "flake8" }
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
scala = { "scalafmt" },
|
||||||
|
swift = { "swift_format" },
|
||||||
|
["*"] = { "trim_whitespace", "trim_newlines" },
|
||||||
|
},
|
||||||
|
format_on_save = {
|
||||||
|
timeout_ms = 500,
|
||||||
|
lsp_fallback = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
|
@ -1,27 +0,0 @@
|
||||||
return {
|
|
||||||
"epwalsh/obsidian.nvim",
|
|
||||||
lazy = true,
|
|
||||||
event = {
|
|
||||||
"BufReadPre " .. vim.fn.expand "~" .. "/obsidian",
|
|
||||||
"BufNewFile " .. vim.fn.expand "~" .. "/obsidian",
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<leader>no", "<cmd>ObsidianQuickSwitch<cr>", desc = "Obsidian Quick Switch (Telescope)" },
|
|
||||||
{ "<leader>nn", "<cmd>ObsidianNew<cr>", desc = "Create a new obsidian note" },
|
|
||||||
{ "<leader>ns", "<cmd>ObsidianSearch<cr>", desc = "Obsidian Search" },
|
|
||||||
{ "<leader>nd", "<cmd>ObsidianToday<cr>", desc = "Obsidian new daily note" },
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
workspaces = {
|
|
||||||
{
|
|
||||||
name = "personal",
|
|
||||||
path = "~/obsidian",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
use_advanced_uri = false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
12
lua/plugins/todo-comments.lua
Normal file
12
lua/plugins/todo-comments.lua
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
return {
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
keys = {
|
||||||
|
{ "<leader>t", "<cmd>TodoTelescope<cr>", desc = "To Do Comments" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
-- your configuration comes here
|
||||||
|
-- or leave it empty to use the default settings
|
||||||
|
-- refer to the configuration section below
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue