aktu
This commit is contained in:
parent
dec72a02aa
commit
f5319fcd7a
5 changed files with 51 additions and 32 deletions
|
@ -76,3 +76,15 @@ vim.opt.foldlevelstart = 99
|
||||||
vim.opt.fillchars = "eob: ,fold: ,foldopen:,foldsep: ,foldclose:"
|
vim.opt.fillchars = "eob: ,fold: ,foldopen:,foldsep: ,foldclose:"
|
||||||
vim.opt.foldmethod = "expr"
|
vim.opt.foldmethod = "expr"
|
||||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
|
|
||||||
|
|
||||||
|
vim.diagnostic.config({
|
||||||
|
-- virtual_text = true,
|
||||||
|
virtual_lines = {
|
||||||
|
current_line = true,
|
||||||
|
format = function(diagnostic)
|
||||||
|
return ('%s: %s [%s]'):format(diagnostic.source, diagnostic.message, diagnostic.code)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
only_current_line = true,
|
||||||
|
})
|
||||||
|
|
|
@ -1,18 +1,26 @@
|
||||||
return {
|
return {
|
||||||
"https://github.com/saghen/blink.cmp",
|
"https://github.com/saghen/blink.cmp",
|
||||||
version = '1.*',
|
version = '1.*',
|
||||||
|
|
||||||
---@module 'blink.cmp'
|
---@module 'blink.cmp'
|
||||||
---@type blink.cmp.Config
|
---@type blink.cmp.Config
|
||||||
opts = {
|
opts = {
|
||||||
keymap = { preset = 'default' },
|
keymap = { preset = 'default' },
|
||||||
appearance = {
|
appearance = {
|
||||||
nerd_font_variant = 'mono'
|
nerd_font_variant = 'mono'
|
||||||
|
},
|
||||||
|
completion = { documentation = { auto_show = false } },
|
||||||
|
sources = {
|
||||||
|
default = { "lazydev", 'lsp', 'path', 'snippets', 'buffer' },
|
||||||
|
providers = {
|
||||||
|
lazydev = {
|
||||||
|
name = "LazyDev",
|
||||||
|
module = "lazydev.integrations.blink",
|
||||||
|
-- make lazydev completions top priority (see `:h blink.cmp`)
|
||||||
|
score_offset = 100,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
completion = { documentation = { auto_show = false } },
|
opts_extend = { "sources.default" }
|
||||||
sources = {
|
|
||||||
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts_extend = { "sources.default" }
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,6 +126,13 @@ return {
|
||||||
{ -- neodev
|
{ -- neodev
|
||||||
"https://github.com/folke/lazydev.nvim",
|
"https://github.com/folke/lazydev.nvim",
|
||||||
ft = "lua",
|
ft = "lua",
|
||||||
|
opts = {
|
||||||
|
library = {
|
||||||
|
-- See the configuration section for more details
|
||||||
|
-- Load luvit types when the `vim.uv` word is found
|
||||||
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ -- A better user experience for interacting with and manipulating marks
|
{ -- A better user experience for interacting with and manipulating marks
|
||||||
"https://github.com/chentoast/marks.nvim",
|
"https://github.com/chentoast/marks.nvim",
|
||||||
|
@ -229,7 +236,7 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
image = {
|
image = {
|
||||||
enabled = true,
|
enabled = false,
|
||||||
doc = {
|
doc = {
|
||||||
inline = false,
|
inline = false,
|
||||||
float = true,
|
float = true,
|
||||||
|
@ -239,6 +246,7 @@ return {
|
||||||
},
|
},
|
||||||
bigfile = { enabled = true },
|
bigfile = { enabled = true },
|
||||||
notifier = { enabled = true },
|
notifier = { enabled = true },
|
||||||
|
explorer = { enabled = true },
|
||||||
notify = { enabled = true },
|
notify = { enabled = true },
|
||||||
quickfile = { enabled = true },
|
quickfile = { enabled = true },
|
||||||
words = { enabled = true },
|
words = { enabled = true },
|
||||||
|
|
|
@ -8,16 +8,14 @@ return {
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
vim.diagnostic.config({
|
-- vim.diagnostic.config({
|
||||||
virtual_text = false
|
-- virtual_text = false
|
||||||
})
|
-- })
|
||||||
local opts = {
|
local opts = {
|
||||||
noremap = true,
|
noremap = true,
|
||||||
silent = true,
|
silent = true,
|
||||||
}
|
}
|
||||||
vim.keymap.set("n", "<space>e", vim.diagnostic.open_float, opts)
|
vim.keymap.set("n", "<space>e", vim.diagnostic.open_float, opts)
|
||||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
|
|
||||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
|
|
||||||
-- vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
-- vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||||
|
|
||||||
local on_attach = function(_, bufnr)
|
local on_attach = function(_, bufnr)
|
||||||
|
@ -106,7 +104,7 @@ return {
|
||||||
local util = require("lspconfig.util")
|
local util = require("lspconfig.util")
|
||||||
return util.root_pattern("Project.toml")(fname)
|
return util.root_pattern("Project.toml")(fname)
|
||||||
or util.find_git_ancestor(fname)
|
or util.find_git_ancestor(fname)
|
||||||
or util.path.dirname(fname)
|
or vim.fs.dirname(fname)
|
||||||
end,
|
end,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
|
@ -129,23 +127,12 @@ return {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
diagnostics = {
|
|
||||||
globals = { "vim" },
|
|
||||||
},
|
|
||||||
telemetry = {
|
telemetry = {
|
||||||
enable = false,
|
enable = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig.cssls.setup {
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
|
|
||||||
lspconfig.html.setup {
|
|
||||||
capabilities = capabilities,
|
|
||||||
}
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
4
lua/znvim/utils.lua
Normal file
4
lua/znvim/utils.lua
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
P = function(v)
|
||||||
|
print(vim.inspect(v))
|
||||||
|
return v
|
||||||
|
end
|
Loading…
Add table
Reference in a new issue