chore: cleanup of nvim
This commit is contained in:
parent
511dabde0f
commit
6984aa64e8
6 changed files with 36 additions and 14 deletions
|
|
@ -110,6 +110,7 @@ require("dapui").setup({
|
|||
max_value_lines = 100, -- Can be integer or nil.
|
||||
},
|
||||
})
|
||||
|
||||
require("mason-nvim-dap").setup({
|
||||
ensure_installed = {
|
||||
"bash-debug-adapter",
|
||||
|
|
@ -118,4 +119,5 @@ require("mason-nvim-dap").setup({
|
|||
"node-debug2-adapter",
|
||||
},
|
||||
})
|
||||
|
||||
require("nvim-dap-virtual-text").setup()
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ require("mason-lspconfig").setup({
|
|||
"cssls", -- css
|
||||
"html", -- html
|
||||
"clangd", -- cpp / c
|
||||
"sumneko_lua", -- lua
|
||||
"lua_ls", -- lua
|
||||
"pyright", -- python
|
||||
"cmake", -- cmake
|
||||
"bashls", -- shell
|
||||
|
|
@ -28,7 +28,12 @@ require("mason-lspconfig").setup({
|
|||
"tsserver", -- js and ts
|
||||
"ltex", -- latex
|
||||
"jdtls", -- jafuck
|
||||
"gopls" -- yet another gargabe collector
|
||||
"gopls", -- yet another gargabe collector
|
||||
"sqls", -- sql
|
||||
"taplo", -- toml
|
||||
"lemminx", -- xml
|
||||
"yamlls", -- yaml
|
||||
"bashls", -- shell
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -19,11 +19,9 @@ nvim_tree.setup { -- BEGIN_DEFAULT_OPTS
|
|||
hijack_cursor = false,
|
||||
hijack_netrw = true,
|
||||
hijack_unnamed_buffer_when_opening = false,
|
||||
ignore_buffer_on_setup = false,
|
||||
open_on_setup = false,
|
||||
open_on_setup_file = false,
|
||||
open_on_tab = false,
|
||||
ignore_buf_on_tab_change = {},
|
||||
sort_by = "name",
|
||||
root_dirs = {},
|
||||
prefer_startup_root = false,
|
||||
|
|
@ -241,3 +239,27 @@ vim.api.nvim_create_autocmd("BufEnter", {
|
|||
end
|
||||
end
|
||||
})
|
||||
|
||||
local function open_nvim_tree(data)
|
||||
|
||||
-- buffer is a [No Name]
|
||||
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
|
||||
|
||||
-- buffer is a directory
|
||||
local directory = vim.fn.isdirectory(data.file) == 1
|
||||
|
||||
if not no_name and not directory then
|
||||
return
|
||||
end
|
||||
|
||||
-- change to the directory
|
||||
if directory then
|
||||
vim.cmd.cd(data.file)
|
||||
end
|
||||
|
||||
-- open the tree
|
||||
require("nvim-tree.api").tree.open()
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ local options = {
|
|||
tabstop = 2, -- insert 2 spaces for a tab
|
||||
scrolloff = 8,
|
||||
sidescrolloff = 8,
|
||||
spell = true,
|
||||
spell = false,
|
||||
syntax = "off",
|
||||
spelllang = "en_us",
|
||||
mousemodel = "popup_setpos",
|
||||
|
|
|
|||
|
|
@ -4,17 +4,9 @@ if not status_ok then
|
|||
end
|
||||
|
||||
require("nvim-treesitter.configs").setup({
|
||||
-- A list of parser names, or "all"
|
||||
ensure_installed = "all",
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
})
|
||||
|
||||
local status_ok2, _ = pcall(require, "spellsitter")
|
||||
if not status_ok2 then
|
||||
return
|
||||
end
|
||||
|
||||
require("spellsitter").setup()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue