mini update nvim config
This commit is contained in:
parent
20f68e1dee
commit
6fa42a7c2d
4 changed files with 78 additions and 73 deletions
|
|
@ -2,7 +2,5 @@ if status is-interactive
|
|||
# Commands to run in interactive sessions can go here
|
||||
zoxide init --cmd cd fish | source
|
||||
atuin init fish | source
|
||||
|
||||
mise activate fish | source
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ vim.o.diffopt = "vertical,closeoff,filler"
|
|||
local opt = vim.opt
|
||||
|
||||
vim.schedule(function()
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
end)
|
||||
|
||||
-- opt.shortmess:append({ W = true, I = true, c = true }) -- INFO: this control the format of some messages
|
||||
|
|
@ -28,9 +28,9 @@ opt.formatoptions = "jcroqlnt" -- tcqj
|
|||
opt.grepformat = "%f:%l:%c:%m"
|
||||
opt.grepprg = "rg --vimgrep"
|
||||
opt.ignorecase = true -- Ignore case
|
||||
opt.inccommand = 'split' -- Preview substitutions live, as you type!
|
||||
opt.inccommand = "split" -- Preview substitutions live, as you type!
|
||||
opt.mouse = "a" -- Enable mouse mode
|
||||
opt.nrformats = 'blank,bin,hex'
|
||||
opt.nrformats = "blank,bin,hex"
|
||||
opt.number = true -- Print line number
|
||||
opt.pumblend = 10 -- Popup blend
|
||||
opt.pumheight = 10 -- Maximum number of entries in a popup
|
||||
|
|
@ -56,8 +56,8 @@ opt.updatetime = 200 -- Save swap file and trigger CursorHold
|
|||
opt.wildmode = "longest,list:full" -- Command-line completion mode
|
||||
opt.winminwidth = 5 -- Minimum window width
|
||||
opt.wrap = false -- Disable line wrap
|
||||
vim.o.completeopt = 'noselect,menu,menuone,noinsert,popup'
|
||||
vim.o.winborder = 'rounded'
|
||||
vim.o.completeopt = "noselect,menu,menuone,noinsert,popup"
|
||||
vim.o.winborder = "rounded"
|
||||
|
||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||
|
||||
|
|
@ -130,18 +130,18 @@ vim.filetype.add({
|
|||
mdx = "mdx",
|
||||
log = "log",
|
||||
conf = "conf",
|
||||
env = "dotenv",
|
||||
-- env = "dotenv",
|
||||
},
|
||||
-- Detect and apply filetypes based on the entire filename
|
||||
filename = {
|
||||
[".env"] = "dotenv",
|
||||
-- [".env"] = "dotenv",
|
||||
["env"] = "dotenv",
|
||||
["tsconfig.json"] = "jsonc",
|
||||
},
|
||||
-- Detect and apply filetypes based on certain patterns of the filenames
|
||||
pattern = {
|
||||
-- INFO: Match filenames like - ".env.example", ".env.local" and so on
|
||||
["%.env%.[%w_.-]+"] = "dotenv",
|
||||
-- ["%.env%.[%w_.-]+"] = "dotenv",
|
||||
["compose.*%.ya?ml"] = "yaml.docker-compose",
|
||||
["docker-compose.*%.ya?ml"] = "yaml.docker-compose",
|
||||
[".*%.blade%.php"] = "blade",
|
||||
|
|
@ -157,11 +157,16 @@ vim.filetype.add({
|
|||
vim.lsp.config("rust-analyzer", {
|
||||
tools = {
|
||||
code_actions = {
|
||||
ui_select_fallback = true
|
||||
}
|
||||
}
|
||||
ui_select_fallback = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.g.markdown_fenced_languages = {
|
||||
"ts=typescript",
|
||||
}
|
||||
|
||||
vim.lsp.enable("denols")
|
||||
|
||||
vim.lsp.inlay_hint.enable(true)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +1,25 @@
|
|||
return {
|
||||
{
|
||||
'mrcjkb/rustaceanvim',
|
||||
version = '^6', -- Recommended
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^6", -- Recommended
|
||||
lazy = false, -- This plugin is already lazy
|
||||
},
|
||||
{
|
||||
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
|
||||
-- used for completion, annotations and signatures of Neovim apis
|
||||
'folke/lazydev.nvim',
|
||||
ft = 'lua',
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua",
|
||||
opts = {
|
||||
library = {
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } }
|
||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"pmizio/typescript-tools.nvim",
|
||||
enabled = false,
|
||||
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
|
||||
opts = {},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@ return {
|
|||
lazy = false,
|
||||
dependencies = { "MunifTanjim/nui.nvim" },
|
||||
keys = {
|
||||
{ "<leader>uH", "<CMD>Hardtime toggle<CR>", desc = "Toggle hardtime" }
|
||||
{ "<leader>uH", "<CMD>Hardtime toggle<CR>", desc = "Toggle hardtime" },
|
||||
},
|
||||
opts = {
|
||||
max_count = 10,
|
||||
disable_mouse = false,
|
||||
restriction_mode = "hint",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue