Compare commits
5 commits
5359736e5f
...
fa2267c1a6
Author | SHA1 | Date | |
---|---|---|---|
fa2267c1a6 | |||
57df48733f | |||
a1c7776c7b | |||
f1b295db43 | |||
508e84bde6 |
5 changed files with 32 additions and 16 deletions
|
@ -6,6 +6,7 @@ require("conform").setup({
|
|||
},
|
||||
formatters_by_ft = {
|
||||
yaml = {"yamlfmt"},
|
||||
sh = { "shfmt" },
|
||||
["_"] = { "trim_whitespace" },
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,2 +1,7 @@
|
|||
require('lsp_lines').setup()
|
||||
vim.diagnostic.config({ virtual_lines = true })
|
||||
|
||||
-- Disable virtual_text since it's redundant due to lsp_lines.
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
})
|
||||
|
|
|
@ -77,6 +77,21 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||
lspconfig.lua_ls.setup {
|
||||
capabilities = capabilities,
|
||||
single_file_support = true,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = {'vim'} -- Add any globals you want to ignore as undefined
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand('$VIMRUNTIME/lua')] = true
|
||||
}
|
||||
},
|
||||
telemetry = {
|
||||
enable = false -- Disable telemetry
|
||||
}
|
||||
}
|
||||
},
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
}
|
||||
|
@ -192,7 +207,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
-- Jumps to the definition of the type symbol
|
||||
bufmap('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>')
|
||||
|
||||
-- Lists all the references
|
||||
-- Lists all the references
|
||||
bufmap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>')
|
||||
|
||||
-- Displays a function's signature information
|
||||
|
|
|
@ -30,17 +30,24 @@ vim.opt.signcolumn = "yes" -- alway show sign column
|
|||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.cursorline = true -- highlight current line
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.showmatch = true
|
||||
vim.opt.smartcase = true -- search: try :to be smart about cases
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.wildmenu = true -- activate enhanced user menu
|
||||
vim.opt.wildmode = 'lastused:full,list' -- enhance menu
|
||||
vim.opt.pumheight = 10
|
||||
vim.opt.pumwidth = 50
|
||||
vim.opt.pumblend = 10
|
||||
|
||||
-- manage line break smartly
|
||||
vim.opt.wrap = true
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.linebreak = true
|
||||
vim.opt.showbreak = string.rep(" ", 3) -- Make it so that long lines wrap smartly
|
||||
|
||||
-- need to activate this for cmp
|
||||
vim.opt.completeopt = {'menu', 'menuone', 'noselect'}
|
||||
-- -- Code Fold
|
||||
|
@ -48,16 +55,6 @@ vim.opt.completeopt = {'menu', 'menuone', 'noselect'}
|
|||
vim.cmd('au BufWinLeave *.* mkview')
|
||||
vim.cmd('au BufWinEnter *.* silent! loadview')
|
||||
|
||||
|
||||
-- Diagnostic settings
|
||||
--
|
||||
-- diagnostic windows must be float
|
||||
vim.diagnostic.config {
|
||||
virtual_text = false,
|
||||
signs = true,
|
||||
underline = true,
|
||||
}
|
||||
|
||||
local signs = { Error = "", Warn = "", Hint = "", Info = "" }
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
|
@ -70,8 +67,6 @@ vim.o.updatetime = 250
|
|||
vim.cmd [[autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {scope='cursor', header = "", prefix = "", focus=false})]]
|
||||
|
||||
-- Autotype
|
||||
vim.cmd('au BufRead,BufNewFile *.md setlocal textwidth=80')
|
||||
vim.cmd('au BufRead,BufNewFile *.tex setlocal textwidth=80')
|
||||
vim.cmd('au BufRead,BufNewFile *.nix setlocal tabstop=2 shiftwidth=2 ')
|
||||
vim.cmd('au BufNewFile,BufRead /tmp/neomutt* set tw=72 fo=awq comments+=nb:> noautoindent filetype=mail')
|
||||
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
enableWideVine = if pkgs.system == "x86_64-linux" then true else false;
|
||||
};
|
||||
})
|
||||
inputs.nur.overlay
|
||||
inputs.nur.overlays.default
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue