improve neotree
This commit is contained in:
parent
1f2e5c54e9
commit
69d5a976f8
20
init.lua
20
init.lua
|
@ -206,8 +206,7 @@ require('lazy').setup({
|
||||||
'rebelot/kanagawa.nvim',
|
'rebelot/kanagawa.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
require('kanagawa').setup {
|
require('kanagawa').setup {
|
||||||
-- Set a style preset. 'dark' is default.
|
theme = 'dragon', -- wave, dragon, lotus
|
||||||
theme = 'dragon', -- dark, darker, cool, deep, warm, warmer, light
|
|
||||||
}
|
}
|
||||||
require('kanagawa').load()
|
require('kanagawa').load()
|
||||||
end,
|
end,
|
||||||
|
@ -294,6 +293,9 @@ vim.o.hlsearch = false
|
||||||
-- Make line numbers default
|
-- Make line numbers default
|
||||||
vim.wo.number = true
|
vim.wo.number = true
|
||||||
|
|
||||||
|
-- Make relative numbers default
|
||||||
|
vim.wo.relativenumber = true
|
||||||
|
|
||||||
-- Enable mouse mode
|
-- Enable mouse mode
|
||||||
vim.o.mouse = 'a'
|
vim.o.mouse = 'a'
|
||||||
|
|
||||||
|
@ -325,6 +327,8 @@ vim.o.completeopt = 'menuone,noselect'
|
||||||
-- NOTE: You should make sure your terminal supports this
|
-- NOTE: You should make sure your terminal supports this
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
|
vim.o.shiftwidth = 4
|
||||||
|
vim.o.tabstop = 4
|
||||||
-- [[ Basic Keymaps ]]
|
-- [[ Basic Keymaps ]]
|
||||||
|
|
||||||
-- Keymaps for better default experience
|
-- Keymaps for better default experience
|
||||||
|
@ -546,6 +550,14 @@ local on_attach = function(_, bufnr)
|
||||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
end, '[W]orkspace [L]ist Folders')
|
end, '[W]orkspace [L]ist Folders')
|
||||||
|
|
||||||
|
-- Add key map for organising imports
|
||||||
|
nmap('<leader>li', function()
|
||||||
|
vim.lsp.buf.execute_command({
|
||||||
|
command = "_typescript.organizeImports",
|
||||||
|
arguments = {vim.api.nvim_buf_get_name(0)},
|
||||||
|
})
|
||||||
|
end, '[L]ay Out [I]mports')
|
||||||
|
|
||||||
-- Create a command `:Format` local to the LSP buffer
|
-- Create a command `:Format` local to the LSP buffer
|
||||||
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||||
vim.lsp.buf.format()
|
vim.lsp.buf.format()
|
||||||
|
@ -588,10 +600,10 @@ local servers = {
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
-- pyright = {},
|
-- pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
-- tsserver = {},
|
|
||||||
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
|
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
|
||||||
-- phpactor = {},
|
-- phpactor = {},
|
||||||
-- intelephense = {},
|
tsserver = {},
|
||||||
|
intelephense = {},
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
Lua = {
|
Lua = {
|
||||||
workspace = { checkThirdParty = false },
|
workspace = { checkThirdParty = false },
|
||||||
|
|
|
@ -10,6 +10,18 @@ return {
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
},
|
},
|
||||||
config = function ()
|
config = function ()
|
||||||
require('neo-tree').setup {}
|
require('neo-tree').setup {
|
||||||
|
default_component_configs = {
|
||||||
|
icon = {
|
||||||
|
folder_closed = "",
|
||||||
|
folder_open = "",
|
||||||
|
folder_empty = "",
|
||||||
|
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
|
||||||
|
-- then these will never be used.
|
||||||
|
default = "*",
|
||||||
|
highlight = "NeoTreeFileIcon"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue