So let's take sulfite, #SO_3^(2-)#. Each chalcogen atom has 6 valence electrons, and there are 2 negative charges: and thus we distribute #4xx6+2=26# #"valence electrons"#.
And thus we get #(O=)ddotS(-O^(-))_2#. For the purpose of assigning formal charge, the two electrons that comprise a single bond are CONCEIVED to be shared by each of the bound atoms. Around the doubly bound oxygen there are 6 electrons, around the sulfur there are 6 electrons, but around the singly bound oxygen atoms, there are 7 valence electrons, and hence these atoms bear the formal negative charges.
For #ClO_2^-#, #"chlorite ion"#, we have #7+2xx6+1=20# electrons to distribute: #O=ddotCl(":")-O^(-)#. From the left, around each atom, there are 6, 7, and 7 valence electrons, and thus the rightmost oxygen bears a formal negative charge. Of course, we can draw the other resonance structure, that distributes the negative charge on the other oxygen. #/_O-Cl-O# should be #109.5^@# to a first approx., however, this angle is compressed by the lone pairs.
If these seems a lot of work, I agree, however, it is easier to do with paper and pen than on an editor. All I have done is to count up the number of electrons associated with each atom, and accounted for the formal charge by adding or subtracting electrons. After you distribute the electrons, it is easy to use VESPER to assign electronic, and then molecular geometries. Why did I make such a distinction?