Coder Social home page Coder Social logo

Allowing comments example about coc-json HOT 5 CLOSED

neoclide avatar neoclide commented on July 27, 2024
Allowing comments example

from coc-json.

Comments (5)

Qyriad avatar Qyriad commented on July 27, 2024 15

To make Vim treat all json files as jsonc:

augroup JsonToJsonc
    autocmd! FileType json set filetype=jsonc
augroup END

Or you can use a modeline (:help modeline) at the very top or bottom of an individual json file, to set the filetype to jsonc for only that file:

// vim: ft=jsonc

from coc-json.

chemzqm avatar chemzqm commented on July 27, 2024 1

The filetype need to be jsonc.

from coc-json.

julian-payne avatar julian-payne commented on July 27, 2024 1

To make Vim treat all json files as jsonc:

augroup JsonToJsonc
    autocmd! FileType json set filetype=jsonc
augroup END

Or you can use a modeline (:help modeline) at the very top or bottom of an individual json file, to set the filetype to jsonc for only that file:

// vim: ft=jsonc

Thank you so much!!
Extremely helpful!

from coc-json.

julian-payne avatar julian-payne commented on July 27, 2024

The filetype need to be jsonc.

Sure.
"Can I please have an example of this configuration?"

What I mean is, what does this look like in .vimrc or init.nvim?

from coc-json.

chemzqm avatar chemzqm commented on July 27, 2024

There's https://github.com/neoclide/jsonc.vim which set jsonc filetype for file with .cjson as extension.

from coc-json.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.