-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c98a58f
commit 8077659
Showing
6 changed files
with
168 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,119 +1,120 @@ | ||
return { | ||
{ "b0o/schemastore.nvim" }, | ||
{ | ||
"jay-babu/mason-null-ls.nvim", | ||
event = { "BufReadPre", "BufNewFile" }, | ||
dependencies = { "williamboman/mason.nvim", "nvimtools/none-ls.nvim" }, | ||
config = function() | ||
require("mason-null-ls").setup({ | ||
ensure_installed = { | ||
"stylua", | ||
"jq", | ||
"black", | ||
"isort", | ||
"yamlfmt", | ||
"ansiblelint", | ||
"markdownlint", | ||
"pylint", | ||
}, | ||
}) | ||
{ "b0o/schemastore.nvim" }, | ||
{ | ||
"jay-babu/mason-null-ls.nvim", | ||
event = { "BufReadPre", "BufNewFile" }, | ||
dependencies = { "williamboman/mason.nvim", "nvimtools/none-ls.nvim" }, | ||
config = function() | ||
require("mason-null-ls").setup({ | ||
ensure_installed = { | ||
"stylua", | ||
"jq", | ||
"black", | ||
"isort", | ||
"yamlfmt", | ||
"ansiblelint", | ||
"markdownlint", | ||
"pylint", | ||
}, | ||
}) | ||
|
||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) | ||
local null_ls = require("null-ls") | ||
null_ls.setup({ | ||
on_attach = function(client, bufnr) | ||
if client.supports_method("textDocument/formatting") then | ||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) | ||
vim.api.nvim_create_autocmd("BufWritePre", { | ||
group = augroup, | ||
buffer = bufnr, | ||
callback = function() | ||
vim.lsp.buf.format({ async = false }) | ||
end, | ||
}) | ||
end | ||
end, | ||
sources = { | ||
null_ls.builtins.formatting.stylua, | ||
null_ls.builtins.formatting.black, | ||
null_ls.builtins.formatting.isort, | ||
null_ls.builtins.completion.spell, | ||
-- FIXME: pylint dont find modules in pyenv | ||
-- null_ls.builtins.diagnostics.pylint, | ||
null_ls.builtins.diagnostics.markdownlint, | ||
null_ls.builtins.formatting.markdownlint, | ||
}, | ||
}) | ||
end, | ||
}, | ||
{ "williamboman/mason.nvim", config = true }, | ||
{ | ||
"WhoIsSethDaniel/mason-tool-installer.nvim", | ||
dependencies = { "williamboman/mason.nvim" }, | ||
config = true, | ||
}, | ||
{ | ||
"williamboman/mason-lspconfig.nvim", | ||
dependencies = { "williamboman/mason.nvim" }, | ||
opts = { | ||
ensure_installed = { | ||
"lua_ls", | ||
"bashls", | ||
"dockerls", | ||
"docker_compose_language_service", | ||
"html", | ||
"jsonls", | ||
"yamlls", | ||
"marksman", | ||
"pyright", | ||
"ansiblels", | ||
}, | ||
automatic_installation = true, | ||
}, | ||
}, | ||
{ | ||
"neovim/nvim-lspconfig", | ||
dependencies = { "hrsh7th/cmp-nvim-lsp", "hrsh7th/nvim-cmp" }, | ||
config = function() | ||
local capabilities = require("cmp_nvim_lsp").default_capabilities() | ||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) | ||
local null_ls = require("null-ls") | ||
null_ls.setup({ | ||
on_attach = function(client, bufnr) | ||
if client.supports_method("textDocument/formatting") then | ||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) | ||
vim.api.nvim_create_autocmd("BufWritePre", { | ||
group = augroup, | ||
buffer = bufnr, | ||
callback = function() | ||
vim.lsp.buf.format({ async = false }) | ||
end, | ||
}) | ||
end | ||
end, | ||
sources = { | ||
null_ls.builtins.formatting.stylua, | ||
null_ls.builtins.formatting.black, | ||
null_ls.builtins.formatting.isort, | ||
null_ls.builtins.completion.spell, | ||
-- FIXME: pylint dont find modules in pyenv | ||
-- null_ls.builtins.diagnostics.pylint, | ||
null_ls.builtins.diagnostics.markdownlint, | ||
null_ls.builtins.formatting.markdownlint, | ||
}, | ||
}) | ||
end, | ||
}, | ||
{ "williamboman/mason.nvim", config = true }, | ||
{ | ||
"WhoIsSethDaniel/mason-tool-installer.nvim", | ||
dependencies = { "williamboman/mason.nvim" }, | ||
config = true, | ||
}, | ||
{ | ||
"williamboman/mason-lspconfig.nvim", | ||
dependencies = { "williamboman/mason.nvim" }, | ||
opts = { | ||
ensure_installed = { | ||
"lua_ls", | ||
"bashls", | ||
"dockerls", | ||
"docker_compose_language_service", | ||
"html", | ||
"jsonls", | ||
"yamlls", | ||
"marksman", | ||
"pyright", | ||
"ansiblels", | ||
}, | ||
automatic_installation = true, | ||
}, | ||
}, | ||
{ | ||
"neovim/nvim-lspconfig", | ||
dependencies = { "hrsh7th/cmp-nvim-lsp", "hrsh7th/nvim-cmp" }, | ||
config = function() | ||
local capabilities = require("cmp_nvim_lsp").default_capabilities() | ||
|
||
local lspconfig = require("lspconfig") | ||
lspconfig.lua_ls.setup({ capabilities = capabilities }) | ||
lspconfig.bashls.setup({ capabilities = capabilities }) | ||
lspconfig.dockerls.setup({ capabilities = capabilities }) | ||
lspconfig.html.setup({ capabilities = capabilities }) | ||
local lspconfig = require("lspconfig") | ||
lspconfig.lua_ls.setup({ capabilities = capabilities }) | ||
lspconfig.bashls.setup({ capabilities = capabilities }) | ||
lspconfig.dockerls.setup({ capabilities = capabilities }) | ||
lspconfig.html.setup({ capabilities = capabilities }) | ||
lspconfig.gopls.setup({ capabilities = capabilities }) | ||
|
||
lspconfig.jsonls.setup({ | ||
capabilities = capabilities, | ||
settings = { | ||
settings = { | ||
json = { schemas = require("schemastore").json.schemas(), validate = { enable = true } }, | ||
}, | ||
}, | ||
}) | ||
lspconfig.yamlls.setup({ | ||
settings = { | ||
yaml = { | ||
keyOrdering = false, | ||
schemaStore = { | ||
-- You must disable built-in schemaStore support if you want to use | ||
-- this plugin and its advanced options like `ignore`. | ||
enable = false, | ||
-- Avoid TypeError: Cannot read properties of undefined (reading 'length') | ||
url = "", | ||
}, | ||
schemas = require("schemastore").yaml.schemas(), | ||
}, | ||
}, | ||
}) | ||
lspconfig.jsonls.setup({ | ||
capabilities = capabilities, | ||
settings = { | ||
settings = { | ||
json = { schemas = require("schemastore").json.schemas(), validate = { enable = true } }, | ||
}, | ||
}, | ||
}) | ||
lspconfig.yamlls.setup({ | ||
settings = { | ||
yaml = { | ||
keyOrdering = false, | ||
schemaStore = { | ||
-- You must disable built-in schemaStore support if you want to use | ||
-- this plugin and its advanced options like `ignore`. | ||
enable = false, | ||
-- Avoid TypeError: Cannot read properties of undefined (reading 'length') | ||
url = "", | ||
}, | ||
schemas = require("schemastore").yaml.schemas(), | ||
}, | ||
}, | ||
}) | ||
|
||
lspconfig.marksman.setup({ capabilities = capabilities }) | ||
lspconfig.pyright.setup({ capabilities = capabilities }) | ||
lspconfig.ansiblels.setup({ capabilities = capabilities }) | ||
lspconfig.marksman.setup({ capabilities = capabilities }) | ||
lspconfig.pyright.setup({ capabilities = capabilities }) | ||
lspconfig.ansiblels.setup({ capabilities = capabilities }) | ||
|
||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {}) | ||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {}) | ||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, {}) | ||
end, | ||
}, | ||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {}) | ||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {}) | ||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, {}) | ||
end, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
return { | ||
{ | ||
"renerocksai/telekasten.nvim", | ||
dependencies = { "nvim-telescope/telescope.nvim" }, | ||
cmd = { "Telekasten" }, | ||
-- stylua: ignore | ||
keys = { | ||
{ '<leader>nn', function() require('telekasten').goto_thisweek() end }, | ||
{ '<leader>nN', function() require('telekasten').new_note() end }, | ||
{ '<leader>nf', function() require('telekasten').find_notes() end }, | ||
{ '<leader>na', function() require('telekasten').search_notes() end }, | ||
{ '<leader>N', function() require('telekasten').panel() end }, | ||
}, | ||
opts = { | ||
home = vim.fn.expand("~/notes/"), | ||
dailies = vim.fn.expand("~/notes/daily"), | ||
weeklies = vim.fn.expand("~/notes/weekly"), | ||
templates = vim.fn.expand("~/notes/templates"), | ||
extension = ".md", | ||
|
||
follow_creates_nonexisting = true, | ||
dailies_create_nonexisting = true, | ||
weeklies_create_nonexisting = true, | ||
|
||
template_new_note = vim.fn.expand("~/notes/templates/new_note.md"), | ||
template_new_daily = vim.fn.expand("~/notes/templates/daily.md"), | ||
template_new_weekly = vim.fn.expand("~/notes/templates/weekly.md"), | ||
}, | ||
}, | ||
} |
Oops, something went wrong.