@@ -14,6 +14,8 @@ call plug#begin()
1414Plug ' nvim-lua/plenary.nvim'
1515Plug ' nvim-telescope/telescope.nvim' , { ' tag' : ' 0.1.8' }
1616Plug ' ellisonleao/gruvbox.nvim'
17+ Plug ' nvim-treesitter/nvim-treesitter' , { ' do' : ' :TSUpdate' }
18+ Plug ' dense-analysis/ale'
1719call plug#end ()
1820
1921nnoremap <leader> ff <cmd> Telescope find_files<cr>
@@ -23,6 +25,8 @@ nnoremap <leader>fh <cmd>Telescope help_tags<cr>
2325nnoremap <leader> da :Lexplore %:p:h<CR>
2426nnoremap <Leader> dd :Explore<CR>
2527
28+ colorscheme gruvbox
29+
2630lua << EOF
2731require (' telescope' ).setup{
2832pickers = {
@@ -32,6 +36,53 @@ pickers = {
3236 }
3337 }
3438}
39+
40+ require' nvim-treesitter.configs' .setup{
41+ -- A list of parser names, or " all" (the listed parsers MUST always be installed)
42+ ensure_installed = { " c" , " lua" , " vim" , " vimdoc" , " query" , " markdown" , " markdown_inline" , " javascript" , " bash" },
43+
44+ -- Install parsers synchronously (only applied to `ensure_installed`)
45+ sync_install = false,
46+
47+ -- Automatically install missing parsers when entering buffer
48+ -- Recommendation: set to false if you don't have `tree- sitter` CLI installed locally
49+ auto_install = true,
50+
51+ -- List of parsers to ignore installing (or " all" )
52+ -- ignore_install = { " javascript" },
53+
54+ ---- If you need to change the installation directory of the parsers (see - > Advanced Setup)
55+ -- parser_install_dir = " /some/path/to/store/parsers" , -- Remember to run vim .opt .runtimepath : append (" /some/path/to/store/parsers" )!
56+
57+ highlight = {
58+ enable = true,
59+
60+ -- NOTE: these are the names of the parsers and not the filetype . (for example if you want to
61+ -- disable highlighting for the `tex` filetype , you need to include `latex` in this list as this is
62+ -- the name of the parser)
63+ -- list of language that will be disabled
64+ disable = { " c" , " rust" },
65+ -- Or use a function for more flexibility, e .g . to disable slow treesitter highlight for large files
66+ disable = function (lang, buf )
67+ local max_filesize = 100 * 1024 -- 100 KB
68+ local ok, stats = pcall (vim .loop.fs_stat, vim .api.nvim_buf_get_name (buf ))
69+ if ok and stats and stats.size > max_filesize then
70+ return true
71+ end
72+ end ,
73+
74+ -- Setting this to true will run `:h syntax ` and tree- sitter at the same time.
75+ -- Set this to `true` if you depend on ' syntax' being enabled (like for indentation).
76+ -- Using this option may slow down your editor, and you may see some duplicate highlights.
77+ -- Instead of true it can also be a list of languages
78+ additional_vim_regex_highlighting = false,
79+ },
80+ }
3581EOF
3682
37- colorscheme gruvbox
83+ " https://github.com/dense-analysis/ale/blob/master/supported-tools.md
84+ let g: ale_linters = {
85+ \ ' json' : [' prettier' ]
86+ \}
87+ " Only run linters named in ale_linters settings.
88+ let g: ale_linters_explicit = 1
0 commit comments