ai, note taking and formatter
This commit is contained in:
parent
f21bde5866
commit
f284d334b4
7 changed files with 96 additions and 52 deletions
|
@ -1,5 +1,6 @@
|
|||
vim.cmd("nnoremap <Space> <Nop>")
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ','
|
||||
|
||||
vim.cmd("set tabstop=4")
|
||||
vim.cmd("set softtabstop=0")
|
||||
|
|
12
lua/Dario48/plugins/codeium.lua
Normal file
12
lua/Dario48/plugins/codeium.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
'Exafunction/codeium.vim',
|
||||
event = 'BufEnter',
|
||||
config = function ()
|
||||
end,
|
||||
keys = {
|
||||
{ '<S-Tab>', function () return vim.fn['codeium#Accept']() end, { expr = true, silent = true }},
|
||||
{ '<c-;>', function() return vim.fn['codeium#CycleCompletions'](1) end, { expr = true, silent = true }},
|
||||
{ '<c-,>', function() return vim.fn['codeium#CycleCompletions'](-1) end, { expr = true, silent = true }},
|
||||
{ '<c-x>', function() return vim.fn['codeium#Clear']() end, { expr = true, silent = true }}
|
||||
}
|
||||
}
|
28
lua/Dario48/plugins/conformer.lua
Normal file
28
lua/Dario48/plugins/conformer.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
cmd = "Conform",
|
||||
config = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
cpp = { "clang-format" },
|
||||
fish = { "fish_indent" },
|
||||
css = { "prettier" },
|
||||
scss = { "prettier" },
|
||||
js = { "prettier" },
|
||||
},
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 500,
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"zapling/mason-conform.nvim",
|
||||
dependencies = { "mason.nvim", "conform.nvim" },
|
||||
config = true,
|
||||
},
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
/\\\\\ /\\\ /\\\\\\\\\\\\\\\ /\\\\\ /\\\ /\\\ /\\\\\\\\\\\ /\\\\ /\\\\
|
||||
\/\\\\\\ \/\\\ \/\\\/////////// /\\\///\\\ \/\\\ \/\\\ \/////\\\/// \/\\\\\\ /\\\\\\
|
||||
\/\\\/\\\ \/\\\ \/\\\ /\\\/ \///\\\ \//\\\ /\\\ \/\\\ \/\\\//\\\ /\\\//\\\
|
||||
\/\\\//\\\ \/\\\ \/\\\\\\\\\\\ /\\\ \//\\\ \//\\\ /\\\ \/\\\ \/\\\\///\\\/\\\/ \/\\\
|
||||
\/\\\\//\\\\/\\\ \/\\\/////// \/\\\ \/\\\ \//\\\ /\\\ \/\\\ \/\\\ \///\\\/ \/\\\
|
||||
\/\\\ \//\\\/\\\ \/\\\ \//\\\ /\\\ \//\\\/\\\ \/\\\ \/\\\ \/// \/\\\
|
||||
\/\\\ \//\\\\\\ \/\\\ \///\\\ /\\\ \//\\\\\ \/\\\ \/\\\ \/\\\
|
||||
\/\\\ \//\\\\\ \/\\\\\\\\\\\\\\\ \///\\\\\/ \//\\\ /\\\\\\\\\\\ \/\\\ \/\\\
|
||||
\/// \///// \/////////////// \///// \/// \/////////// \/// \///
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
{
|
||||
'VonHeikemen/lsp-zero.nvim',
|
||||
branch = 'v3.x',
|
||||
"VonHeikemen/lsp-zero.nvim",
|
||||
branch = "v3.x",
|
||||
lazy = true,
|
||||
config = false,
|
||||
init = function()
|
||||
|
@ -11,85 +11,96 @@ return {
|
|||
end,
|
||||
},
|
||||
{
|
||||
'williamboman/mason.nvim',
|
||||
"williamboman/mason.nvim",
|
||||
lazy = false,
|
||||
config = function ()
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
end,
|
||||
keys = {
|
||||
{"<leader>m", ":Mason <CR>", desc = "open mason"}
|
||||
}
|
||||
{ "<leader>m", ":Mason <CR>", desc = "open mason" },
|
||||
},
|
||||
},
|
||||
|
||||
-- Autocompletion
|
||||
{
|
||||
'hrsh7th/nvim-cmp',
|
||||
event = 'InsertEnter',
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
{'L3MON4D3/LuaSnip'},
|
||||
{ "L3MON4D3/LuaSnip" },
|
||||
},
|
||||
config = function()
|
||||
-- Here is where you configure the autocompletion settings.
|
||||
local lsp_zero = require('lsp-zero')
|
||||
local lsp_zero = require("lsp-zero")
|
||||
lsp_zero.extend_cmp()
|
||||
|
||||
-- And you can configure cmp even more, if you want to.
|
||||
local cmp = require('cmp')
|
||||
local cmp = require("cmp")
|
||||
local cmp_action = lsp_zero.cmp_action()
|
||||
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{name = 'nvim_lsp'},
|
||||
{name = 'nvim_lua'},
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "nvim_lua" },
|
||||
},
|
||||
formatting = lsp_zero.cmp_format(),
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
[' '] = cmp.mapping.confirm({select = true}),
|
||||
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-f>'] = cmp_action.luasnip_jump_forward(),
|
||||
['<C-b>'] = cmp_action.luasnip_jump_backward(),
|
||||
})
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
[" "] = cmp.mapping.confirm({ select = false }),
|
||||
["<C-u>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-f>"] = cmp_action.luasnip_jump_forward(),
|
||||
["<C-b>"] = cmp_action.luasnip_jump_backward(),
|
||||
}),
|
||||
})
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
-- LSP
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
cmd = {'LspInfo', 'LspInstall', 'LspStart'},
|
||||
event = {'BufReadPre', 'BufNewFile'},
|
||||
"neovim/nvim-lspconfig",
|
||||
cmd = { "LspInfo", "LspInstall", "LspStart" },
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
{'hrsh7th/cmp-nvim-lsp'},
|
||||
{'williamboman/mason-lspconfig.nvim'},
|
||||
{ "hrsh7th/cmp-nvim-lsp" },
|
||||
{ "williamboman/mason-lspconfig.nvim" },
|
||||
},
|
||||
config = function()
|
||||
-- This is where all the LSP shenanigans will live
|
||||
local lsp_zero = require('lsp-zero')
|
||||
local lsp_zero = require("lsp-zero")
|
||||
lsp_zero.extend_lspconfig()
|
||||
|
||||
lsp_zero.on_attach(function(client, bufnr)
|
||||
-- see :help lsp-zero-keybindings
|
||||
-- to learn the available actions
|
||||
vim.keymap.set("n", "gd", function () vim.lsp.buf.definition() end, {buffer = bufnr, remap = false})
|
||||
vim.keymap.set("n", "<leader>ca", function () vim.lsp.buf.code_action() end, {buffer = bufnr, remap = false})
|
||||
lsp_zero.default_keymaps({buffer = bufnr})
|
||||
vim.keymap.set("n", "gd", function()
|
||||
vim.lsp.buf.definition()
|
||||
end, { buffer = bufnr, remap = false })
|
||||
vim.keymap.set("n", "<leader>ca", function()
|
||||
vim.lsp.buf.code_action()
|
||||
end, { buffer = bufnr, remap = false })
|
||||
lsp_zero.default_keymaps({ buffer = bufnr })
|
||||
end)
|
||||
|
||||
require('mason-lspconfig').setup({
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {},
|
||||
handlers = {
|
||||
lsp_zero.default_setup,
|
||||
lua_ls = function()
|
||||
-- (Optional) Configure lua language server for neovim
|
||||
local lua_opts = lsp_zero.nvim_lua_ls()
|
||||
require('lspconfig').lua_ls.setup(lua_opts)
|
||||
require'lspconfig'.ltex.setup{}
|
||||
require("lspconfig").lua_ls.setup(lua_opts)
|
||||
require("lspconfig").ltex.setup({})
|
||||
end,
|
||||
}
|
||||
},
|
||||
})
|
||||
end,
|
||||
keys = {{"<leader>qf", function() vim.lsp.buf.code_action() end, silent=true, desc="quickfix"}}
|
||||
}
|
||||
keys = { {
|
||||
"<leader>qf",
|
||||
function()
|
||||
vim.lsp.buf.code_action()
|
||||
end,
|
||||
silent = true,
|
||||
desc = "quickfix",
|
||||
} },
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
return {
|
||||
"nvim-neorg/neorg",
|
||||
dependencies = { "luarocks.nvim" },
|
||||
lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
|
||||
config = true,
|
||||
lazy = true, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
|
||||
opts = {
|
||||
load = {
|
||||
["core.defaults"] = {},
|
||||
|
@ -17,5 +16,7 @@ return {
|
|||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ft = "norg",
|
||||
cmd = "Neorg"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue