Compare commits
10 Commits
50a8c1fcc7
...
94b2c40db1
| Author | SHA1 | Date | |
|---|---|---|---|
| 94b2c40db1 | |||
| bed9726930 | |||
| 0117c3812b | |||
| f482b920f8 | |||
| bf4008358d | |||
| d05390b2e7 | |||
| 5be678def0 | |||
| 74b1528403 | |||
| 5b6c9c986f | |||
| 8fbe4074bf |
@@ -127,16 +127,16 @@ autocmd("BufRead", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- SQL files
|
-- SQL files
|
||||||
autocmd("FileType", {
|
-- autocmd("FileType", {
|
||||||
pattern = { "sql", "mysql", "plsql" },
|
-- pattern = { "sql", "mysql", "plsql" },
|
||||||
callback = function()
|
-- callback = function()
|
||||||
local cmp = require("cmp")
|
-- local cmp = require("cmp")
|
||||||
cmp.setup.buffer({
|
-- cmp.setup.buffer({
|
||||||
sources = {
|
-- sources = {
|
||||||
{ name = "vim-dadbod" },
|
-- { name = "vim-dadbod" },
|
||||||
{ name = "nvim_lsp" },
|
-- { name = "nvim_lsp" },
|
||||||
{ name = "buffer" },
|
-- { name = "buffer" },
|
||||||
},
|
-- },
|
||||||
})
|
-- })
|
||||||
end,
|
-- end,
|
||||||
})
|
-- })
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ map("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
|
|||||||
|
|
||||||
-- Explorer keymaps (Snacks explorer)
|
-- Explorer keymaps (Snacks explorer)
|
||||||
-- Ctrl+Shift+e - Toggle explorer
|
-- Ctrl+Shift+e - Toggle explorer
|
||||||
map("n", "<C-S-e>", function() Snacks.explorer() end, { desc = "Toggle Explorer" })
|
map("n", "<C-e>", function() Snacks.explorer() end, { desc = "Toggle Explorer" })
|
||||||
map("i", "<C-S-e>", function() Snacks.explorer() end, { desc = "Toggle Explorer" })
|
map("i", "<C-e>", function() Snacks.explorer() end, { desc = "Toggle Explorer" })
|
||||||
|
|
||||||
-- Note: Ctrl+Shift+v and Ctrl+Shift+h for opening files in splits
|
-- Note: Ctrl+Shift+v and Ctrl+Shift+h for opening files in splits
|
||||||
-- are configured in the snacks picker config (lua/plugins/editor.lua)
|
-- are configured in the snacks picker config (lua/plugins/editor.lua)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ opt.number = true -- Show line numbers
|
|||||||
opt.relativenumber = true -- Relative line numbers
|
opt.relativenumber = true -- Relative line numbers
|
||||||
opt.signcolumn = "yes" -- Always show sign column
|
opt.signcolumn = "yes" -- Always show sign column
|
||||||
opt.termguicolors = true -- True color support
|
opt.termguicolors = true -- True color support
|
||||||
opt.wrap = true -- Disable line wrap
|
opt.wrap = false -- Disable line wrap
|
||||||
|
|
||||||
-- Indentation
|
-- Indentation
|
||||||
opt.expandtab = true -- Use spaces instead of tabs
|
opt.expandtab = true -- Use spaces instead of tabs
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ return {
|
|||||||
cmd = { "DBUI", "DBUIToggle", "DBUIAddConnection", "DBUIFindBuffer" },
|
cmd = { "DBUI", "DBUIToggle", "DBUIAddConnection", "DBUIFindBuffer" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "tpope/vim-dadbod", lazy = true },
|
{ "tpope/vim-dadbod", lazy = true },
|
||||||
|
{ "kristijanhusak/vim-dadbod-completion", ft = { 'sql', 'mysql', 'plsql' }, lazy = true },
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
-- UI configuration
|
-- UI configuration
|
||||||
@@ -41,44 +42,21 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Autocompletion for dadbod
|
-- Completion
|
||||||
{
|
{
|
||||||
"kristijanhusak/vim-dadbod-completion",
|
'saghen/blink.cmp',
|
||||||
dependencies = {
|
opts = {
|
||||||
"tpope/vim-dadbod",
|
sources = {
|
||||||
"hrsh7th/nvim-cmp",
|
default = { "lsp", "path", "snippets", "buffer" },
|
||||||
},
|
per_filetype = {
|
||||||
ft = { "sql", "mysql", "plsql" },
|
sql = { 'snippets', 'dadbod', 'buffer' },
|
||||||
init = function()
|
},
|
||||||
-- Setup completion for SQL files
|
-- add vim-dadbod-completion to your completion providers
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
providers = {
|
||||||
pattern = { "sql", "mysql", "plsql" },
|
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink"}
|
||||||
callback = function()
|
}
|
||||||
local cmp = require("cmp")
|
}
|
||||||
local sources = cmp.get_config().sources or {}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
-- Add dadbod completion source
|
|
||||||
table.insert(sources, { name = "vim-dadbod-completion" })
|
|
||||||
|
|
||||||
cmp.setup.buffer({
|
|
||||||
sources = cmp.config.sources(sources),
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Add dadbod-completion to nvim-cmp sources
|
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
optional = true,
|
|
||||||
dependencies = {
|
|
||||||
"kristijanhusak/vim-dadbod-completion",
|
|
||||||
"nvim-cmp",
|
|
||||||
},
|
|
||||||
opts = function(_, opts)
|
|
||||||
opts.sources = opts.sources or {}
|
|
||||||
table.insert(opts.sources, { name = "vim-dadbod-completion" })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,4 +156,38 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Help comment and uncomment lines
|
||||||
|
{
|
||||||
|
'numToStr/Comment.nvim',
|
||||||
|
opts = {
|
||||||
|
padding = true,
|
||||||
|
|
||||||
|
-- LHS of toggle mappings in NORMAL mode
|
||||||
|
toggler = {
|
||||||
|
line = 'gcc',
|
||||||
|
block = 'gbc',
|
||||||
|
},
|
||||||
|
|
||||||
|
-- LHS of operator-pending mappings in NORMAL and VISUAL
|
||||||
|
opleader = {
|
||||||
|
line = "gc",
|
||||||
|
block = "gb",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- LHS of extra mappings
|
||||||
|
extra = {
|
||||||
|
-- Add comment on the line above
|
||||||
|
above = 'gcO',
|
||||||
|
-- Add comment on the line below
|
||||||
|
below = 'gco',
|
||||||
|
-- Add comment at the end of line
|
||||||
|
eol = 'gcA',
|
||||||
|
},
|
||||||
|
mappings = {
|
||||||
|
basic = true,
|
||||||
|
extra = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,24 +23,26 @@ return {
|
|||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
-- LSP servers
|
-- LSP servers
|
||||||
"gopls", -- Go
|
"gopls", -- Go
|
||||||
"lua-language-server", -- Lua
|
"lua-language-server", -- Lua
|
||||||
"typescript-language-server", -- TypeScript/JavaScript
|
"typescript-language-server", -- TypeScript/JavaScript
|
||||||
"js-debug-adapter", -- JS
|
"js-debug-adapter", -- JS
|
||||||
"html-lsp", -- HTML
|
"html-lsp", -- HTML
|
||||||
"css-lsp", -- CSS
|
"css-lsp", -- CSS
|
||||||
"json-lsp", -- JSON
|
"json-lsp", -- JSON
|
||||||
"yaml-language-server", -- YAML
|
"yaml-language-server", -- YAML
|
||||||
"marksman", -- Markdown
|
"marksman", -- Markdown
|
||||||
"sqlls", -- SQL
|
"sqlls", -- SQL
|
||||||
"pyright", --Python
|
"pyright", --Python
|
||||||
"ruff", --Python
|
"ruff", --Python
|
||||||
"docker-language-server", -- Docker
|
"docker-language-server", -- Docker
|
||||||
|
"zls", -- Zig
|
||||||
-- Linters
|
-- Linters
|
||||||
"golangci-lint",
|
"golangci-lint",
|
||||||
"eslint_d",
|
"eslint_d",
|
||||||
"markdownlint",
|
"markdownlint",
|
||||||
"hadolint",
|
"hadolint",
|
||||||
|
"shellcheck",
|
||||||
-- Formatters
|
-- Formatters
|
||||||
"gofumpt",
|
"gofumpt",
|
||||||
"goimports",
|
"goimports",
|
||||||
@@ -107,8 +109,15 @@ return {
|
|||||||
|
|
||||||
-- Lua
|
-- Lua
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
root_dir = make_root_detector({ ".luarc.json", ".luarc.jsonc", ".luacheckrc", ".stylua.toml", "stylua.toml",
|
root_dir = make_root_detector({
|
||||||
"selene.toml", "selene.yml" }),
|
".luarc.json",
|
||||||
|
".luarc.jsonc",
|
||||||
|
".luacheckrc",
|
||||||
|
".stylua.toml",
|
||||||
|
"stylua.toml",
|
||||||
|
"selene.toml",
|
||||||
|
"selene.yml",
|
||||||
|
}),
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
workspace = {
|
workspace = {
|
||||||
@@ -233,6 +242,8 @@ return {
|
|||||||
"gitcommit",
|
"gitcommit",
|
||||||
"git_rebase",
|
"git_rebase",
|
||||||
"dockerfile",
|
"dockerfile",
|
||||||
|
"latex",
|
||||||
|
"typst",
|
||||||
},
|
},
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
|
|||||||
7
lua/plugins/markdown.lua
Normal file
7
lua/plugins/markdown.lua
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
"OXY2DEV/markview.nvim",
|
||||||
|
lazy = false,
|
||||||
|
dependencies = {
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
},
|
||||||
|
}
|
||||||
5
lua/plugins/zig.lua
Normal file
5
lua/plugins/zig.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
'https://codeberg.org/ziglang/zig.vim',
|
||||||
|
lazy = true,
|
||||||
|
ft = { "zig" },
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user